Hey,
yes, that’s correct. If I am not wrong, WooCommerce uses the wp_get_attachment_image() function to dislay the product thumbnails, and that function does not has a filter to modify the markup… There is a ticket for that (https://core.trac.ww.wp.xz.cn/ticket/27399) but not much action there, sorry.
Best,
Florian
If I add your plugin’s class .lazyload around some element of product list, it will work, no?
Unfortunately no, it wouldn’t. The images would need the class directly. However, the lazysizes script that the plugin uses for lazy loading has a extension that could allow you to lazy load a whole area (the product list) of markup: https://github.com/aFarkas/lazysizes/tree/gh-pages/plugins/noscript
I described in another thread how that could be done: https://ww.wp.xz.cn/support/topic/lazy-load-css-background-image/#post-10918101
Best,
Florian
You have it in media options: Include lazysizes unveilhooks plugin, enabled it.
Will it work now with lazyload class around?
Seems like it worked for slideshow element 🙂
No, it won’t – the unveilhooks option makes it possible to add lazy loading to more elements (like iFrames, audio, video) but not wrapper elemnts. Like said, you would need to use the noscript extension (that is not part of the plugin).
ok, thank you anyway, it worked great on blog 🙂
Great to hear that, thanks 🙂 I will mark this as resolved for now.