3 ms·
This is a poorly thought feature. You always want to have the image loaded before you actually use it. You don't want to wait until you actually use the image.
by d--b 7y ago
This is a poorly thought feature.
You always want to have the image loaded before you actually use it. You don't want to wait until you actually use the image. For instance in a carousel, you'll want to load the next and previous image, not just the current displayed one.
I'd much rather have a "loading order" than lazy loading. Sure, I don't want to load first the big images that I'll want to display later, but I definitely don't want them to appear while I scroll down...
- acdha 7y agoThis is covered in the part about the “calculated distance” where they describe the logic used to load the images in the current implementation: it loads before use but waits until the images are near the viewport. There's an FAQ about carousels, too: https://web.dev/native-lazy-loading#how-does-the-loading-attribute-work-with-images-that-are-in-the-viewport-but-not-immediately-visible-(for-example-behind-a-carousel) https://web.dev/native-lazy-loading#how-does-the-loading-att... > How does the loading attribute work with images that are in the viewport but not immediately visible (for example, behind a carousel)? > > Only images that are below the device viewport by the calculated distance load lazily. All images above the viewport, regardless of whether they're immediately visible, load normally.