Archived topic
Skip lazy load not working
3 replies · Started by Yvon on October 21, 2021
Dear support,
I have set lazy load for images in the plugin SGOptimizer (from Siteground). I try to exclude images above the fold by adding the class "skip-lazy" to those images in the advanced settings. When I load the page the images are still lazy loading so something is wrong, but I can't find it. Could you help me with this. I have emptied caches, but that did not help.
When I use the inspector, I notice that the enfolding wp-block-image has the class skip-lazy. But next comes a "figure" that has the actual image, and has the class lazy load. See screenshot:
https://snipboard.io/kuOsbL.jpg
The site is http://www.ingevanhaselen.nl
How can I solve this issue? Thanks for your help!
Yvon
Hi there,
unfortunately its not possible without custom development. The way the class is added is handled by WordPress core, and for some crazy reason they decided not to apply the class to the <img>. You could check with SG to see if their lazy loader has a filter to target the img inside the figure.
Alternatively, you would have to resort to using a HTML block to output your own img HTML.
Hi David,
Thanks for your reply, I understand it now and will ask Siteground.
Yvon
Let us know how you get on.