5 ms·
Or maybe, and this might sound crazy, just USE THE FUCKING IMAGE TAG. Seriously, websites where the images are broken without javascript are FUCKING ANNOYING.
by fake-name 8y ago
Or maybe, and this might sound crazy, just USE THE FUCKING IMAGE TAG.
Seriously, websites where the images are broken without javascript are FUCKING ANNOYING.
There are image formats that support progressive rendering. Use those if you're that desperate, but STOP BREAKING THE FUCKING INTERNET FOR NO GOOD REASON.
- antibland 8y agoNative lazy-loading[0] is coming in Chrome 75. <img src="celebration.jpg" loading="lazy" alt="..." /> [0] https://addyosmani.com/blog/lazy-loading/ https://addyosmani.com/blog/lazy-loading/
- tyingq 8y agoWith some caveats, like "An implementation detail of loading in Chrome is that it fetches the first 2KB of images on page-load.". That's the first 2KB of every image.
- Traubenfuchs 8y agoSo on the server side I will have lots of errors/exceptions because only 2kb were loaded of each image?
- tyingq 8y agoI assume it does a range request. I was more pointing out that the client will still make a lot of requests. So maybe still not a good approach for long pages with tons of images below the fold.
- Diti 8y agoGreat⸮ As a regular underground public transportation commuter (without a data connection, except at very specific stations), I might soon have to scroll through an entire page of lazy-loaded images to ensure the page will be accessible for consumption during my trip! But it’s a good thing, textual content will be easier to consume.
- osrec 8y agoMy webpage might need to load 1000 images eventually. It's kinda inefficient to try and load them all at the start, especially if the user is never going to scroll through all of them. Also, progressive rendering solves an entirely different problem.
- hallman76 8y ago> My webpage might need to load 1000 images eventually. It's kinda inefficient to try and load them all at the start, especially if the user is never going to scroll through all of them. That's a fair concern, but this library won't help with that.