Skip to content
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

Recent update broke lazyloading #46

Open
PubliAlex opened this issue Nov 28, 2019 · 1 comment
Open

Recent update broke lazyloading #46

PubliAlex opened this issue Nov 28, 2019 · 1 comment

Comments

@PubliAlex
Copy link
Contributor

Hello,

Due to a recent plugin update (don't know the exact commit), the lazyloading on image no longer work.

I used to use the excellent lazysizes library in order to manage lazyloading for my images, which lead to something like that :

<img class="lazyload" data-src="{{ 'assets/img/mypicture.jpg'|theme }}" data-sizes="auto" alt="" />

And until now, it worked perfectly, when the image come to the viewport, lazysizes do it's stuff and dynamically add the src tag to my image. I developped more than 50 website that way, without problems.

I noticed recently on some website that lazyloading was broken, all pictures on the pages directly have a src tag, even if not on the viewport.

I could confirm that the problem is due to an update of this plugin. I tested on an old install (before focus update), the lazyloading worked perfectly. Then, I updated the module, and the src tag of all images were here on page load :/

Not a critical issue cause it does not break websites, but lazyloading is an important thing today, so It's a quite major issue as many live website that use this module probably lost lazyloading features.

Best regards,

Alex

@PubliAlex
Copy link
Contributor Author

PubliAlex commented Nov 28, 2019

Found the concerned issue. It seems to be the one of April 29th #35

Especially that line : $this->setSrcAttribute($node, $sourceSet);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant