-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lazy-images does not work with srcset #22
Comments
@BlindDespair yes the content will shift when the images are loaded lazily. I think the following line is only getting the attribute
|
Actually the content should not resize when the images are loaded lazy. An empty scully-plugins/plugins/lazy-images/src/lazy-images.js Lines 44 to 47 in e00bc68
|
@marcjulian thank you for the response. Actually I figured what was screwing me up was Angular, when it was bootrapping on top of the prerendered page, it simply threw out the img tags with data-src attributes and recreated them again with srcs. That's why all the images were still loaded after startup instead of lazy load. So I instead wrote a really simple angular-based solution with a directive and a service that do the lazy loading. Unfortunately, a scully plugin was not good for me in this case. |
Thank you for creating this plugin. Although unfortunately when I tried it out it didn't work for me.
src
were not replaced withdata-src
and all the images were loaded instantly. But it did produce a lot of layout shifting due to image size changing. All I did was just included the plugin in defaultPostrenderes and that's all. But even if the sizing issue is gone, I checked the source code and it's lacking handling ofsrcset
which I have quite a lot on my site.I could help addressing these issues, but I need some guidance.
The text was updated successfully, but these errors were encountered: