Issue on category block with lazy load enabled

This topic has 4 replies, 3 voices, and was last updated 1 months, 3 weeks ago ago by Andrew Mitchell

  • Avatar: Mauro Giorgi
    M.
    Participant
    February 12, 2025 at 09:37

    Hi,
    I’ve added “category product” block on homepage but I’ve issue with images…. with lazy load enabled the image are right but without lazy load the imaged is scaled.
    See private content for details.
    Thanks

    Please, contact administrator
    for this information.
    3 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    February 12, 2025 at 17:08

    Dear @Mauro,

    We hope you are doing well.

    We have identified that the first sizes data values for certain images are assigned the “auto” value (https://prnt.sc/A8PNVtRy5elm), which is configured by default in WordPress. This behavior is officially documented in their documentation.

    Additionally, since multiple customers have reported similar issues regarding incorrect image proportions, WordPress has provided a solution. To address this, we have added the following snippet to the child-theme/functions.php file on your website:

    add_filter('wp_img_tag_add_auto_sizes', '__return_false');

    For further details, you may refer to the official WordPress documentation: https://make.wordpress.org/core/2024/10/18/auto-sizes-for-lazy-loaded-images-in-wordpress-6-7/

    Regarding your inquiry about why this issue does not occur with AJAX-loaded categories, the reason is that WordPress applies this behavior only to images that are initially visible on the page. If a section is loaded via AJAX, these filters are not applied to the images within that section.

    Please let us know if you have any further questions.

    Best regards,
    Jack Richardson
    8Theme Team

    Avatar: Mauro Giorgi
    M.
    Participant
    February 12, 2025 at 17:18

    Ok now it work fine.
    Thanks

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    February 12, 2025 at 17:18

    Dear Mauro,

    We trust our theme is enhancing your experience. Taking a brief moment to rate it with a glowing 5 stars on ThemeForest would be immensely appreciated. Your feedback holds significant value for us.

    Click here to rate now: https://themeforest.net/downloads

    Thank you sincerely for your ongoing support!

    Best Regards,
    The 8Theme Team

  • Viewing 4 results - 1 through 4 (of 4 total)

The issue related to '‘Issue on category block with lazy load enabled’' has been successfully resolved, and the topic is now closed for further responses

Helpful Topics

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.