This topic has 5 replies, 2 voices, and was last updated 10 years by Abe.

  • Author
  • #11900
     sharmstr
    Moderator

    Took me forever to figure this one out. Turns out if your featured image is less than 480px wide, it wont show up in the masonry grid. I figured out that the aq_resize isn’t working for smaller images in post-content-masonry.php.

    I verified the following.

    1 – get_post_thumbnail_id get the correct id
    2 – wp_get_attachment_url gets the correct url for the image
    3 – aq_resize returns “” if the image is less than 480px! arrrgggg. (sorry, I’m just a bit frustrated since I burnt hours figuring this out.)

    In order to fix this, I had to pass a null height and true for cropping, single and upscale.

    COPY CODE
    
    $image = aq_resize( $img_url, 480, '', true, true, true );
    

    Here’s info from the devloper on this: https://github.com/syamilmj/Aqua-Resizer/issues/40

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #12121
     Abe
    Keymaster

    Yes indeed it needed the option to force upscale. We already fixed it for 1.2 version

    Thanks

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #12198
     sharmstr
    Moderator

    The fix didnt work. I had to change it to $image = aq_resize( $img_url, 480, null, true, true, true );

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #12260
     Abe
    Keymaster

    Hi, It should have only 6 parameters like:
    aq_resize( $img_url, 480, 9999, null, true, true );
    This is included in the update 1.2

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #12271
     sharmstr
    Moderator

    my fix only has 6 parameters. look closely. and your fix didnt work for a few of us. mine did.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #12279
     Abe
    Keymaster

    Thanks sharmstr, Seems the cropping parameter needed to be set to true.
    We modified this for next version

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?