dinbror / blazy

Hey, be lazy! bLazy.JS is a lightweight pure JavaScript script for lazy loading and multi-serving images. It's working in all modern browsers including IE7+.
http://dinbror.dk/blazy
MIT License
2.63k stars 356 forks source link

Starts on scroll but not on load #120

Closed jenstornell closed 7 years ago

jenstornell commented 7 years ago

On my site the images are loaded when I scroll but not on load. Can I force trigger Blazy to load visible images on load as well?

dinbror commented 7 years ago

Hey @jenstornell They should out of the box. Do you have a link so I can see? There is a public function (revalidate) you can call but it shouldn't be needed.

jenstornell commented 7 years ago

It was probably some wierd image loading delay. A bit strange.

Anyway, I ended up with an own plugin: https://github.com/jenstornell/img-defer.js

It's not lazy load, but it's loading the images after dom has loaded.