3 ms·
> As a content consumer I'm frequently annoyed, when I have to wait for images to load while scrolling. That's the experience most javascript solutions gave yo
by kilian 5y ago
> As a content consumer I'm frequently annoyed, when I have to wait for images to load while scrolling.
That's the experience most javascript solutions gave you. This browser native solution will load images _before_ they're visible in the viewport so you do not get the fading-in flashes you often see. Combine it with setting the width and height on an element and your page also won't shift around as you scroll.
This will actually optimize for the reader as it will improve the time it takes before they can interact with your page. I also think you'd be very disappointed if you see the percentages of people that end up scrolling on any given page.