Tagged: async loading, Images, lazy loading
Hi guys!
For some reason all my website images are loading “async” instead of “lazy” even though the option is there enabled to lazy load.
Help!
Thank you!
Havi
Sending you the website on the private content
Hey havi,
Thank you for the inquiry.
The loading attribute is set to lazy, but the decoding attribute has been added. If you want to remove the decoding attribute, you can add this filter in the functions.php file:
add_filter( 'wp_img_tag_add_decoding_attr', function( $value, $image, $context ) {
return false;
}, 10, 3 );
Let us know the result.
Best regards,
Ismael
Hi Ismael!
The decoding attribute was there before but the loading lazy is gone. How do I bring back lazy load?
Sending you another website on the private content section with an older version of Enfold (5.7.1) where you can see both elements lazy loading and decoding. Latest update to Enfold on the first site I sent you got rid of the lazy loading.
Updated directly from Envato.
Thank you!
Havi
Hi,
Thank you for the update.
We may need to access the dashboard in order to check the issue further. Please provide the login details in the private field.
Best regards,
Ismael
Hi Ismael,
Sending them to you for the Staging site (you can see the same thing happening) on the private content.
Thank you!
Havi
Hi,
Thank you for the info.
Lazy loading is working as expected. You can see it in action here:https://drive.google.com/file/d/1OMT7W6kwgbutLuWBIKEe61r_I4KPoeLT/view?usp=sharing
As you may have noticed, some of the images loaded immediately because they are above the fold or close to it, while the bottom images start loading only upon scrolling.
Best regards,
Ismael