verlok / vanilla-lazyload

LazyLoad is a lightweight, flexible script that speeds up your website by deferring the loading of your below-the-fold images, backgrounds, videos, iframes and scripts to when they will enter the viewport. Written in plain "vanilla" JavaScript, it leverages IntersectionObserver, supports responsive images and enables native lazy loading.
https://www.andreaverlicchi.eu/vanilla-lazyload/
MIT License
7.68k stars 675 forks source link

All images are lodaing at once #258

Closed bodanus7 closed 6 years ago

bodanus7 commented 6 years ago

Hey,

Can somebody tell me why all images are loading at once? https://getpublii.com/themes/demo/mercury/1/dirty-facts-about-photography-revealed/

Thank you in advance.

verlok commented 6 years ago

Hey @bodanus7, this is happening on Safari and Internet Explorer because you're using LazyLoad v. 10 instead of doing conditional loading. It's all explained in the readme.md file, "versions information" section. https://github.com/verlok/lazyload#versions-information

bodanus7 commented 6 years ago

Thanks @verlok

This is happening on Chrome and FF too.

verlok commented 6 years ago

I tried it on Chrome 5 minutes ago and it wasn’t happening. The images were loading only when scrolling down.

bodanus7 commented 6 years ago

Hm.. it's weird... have a look at the attached screenshot:

screenshot

There are three big pictures and all of them are loading at once.

verlok commented 5 years ago

It seems a problem derived from the threshold option. If you still need help, please reproduce the issue on codepen and I will be able to help you. (I see you're using another script in your website now)