aFarkas / lazysizes

High performance and SEO friendly lazy loader for images (responsive and normal), iframes and more, that detects any visibility changes triggered through user interaction, CSS or JavaScript without configuration.
MIT License
17.56k stars 1.73k forks source link

Behaviour on scrollTop animation #940

Open guillaumedebeauvoir opened 2 years ago

guillaumedebeauvoir commented 2 years ago

Hi there, I was wondering if you could think of a way to stop lazyloading when a scrollTop animation is triggered (timeline kind of usage - google photos is a good example).

Indeed, when scrolling, all images are displayed and then the TOP target is not good anymore, I have tried to loop untill the top is not reached, but it has low performance. I have tried to set class to none before scrollTop animation and then put it back, but again the previous pictures are displayed, resulting in pushing the scroll to top!

If anyone have a solution, I would appreciate a lot. Best