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
This topic has 4 replies, 3 voices, and was last updated 1 months, 3 weeks ago ago by Andrew Mitchell
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
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
Ok now it work fine.
Thanks
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
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