Native lazy loading is part of the HTML specification

Thu 13, Feb 2020 html webdev

Loading images just as soon as they get into the viewport has been a thing for some time. It is used for performance reasons, as the page loads faster this way. There was no way to do this with plain HTML, though. Now there is! Chrome's loading attribute on <img> tags has made it into the HTML standard.

All you have to do to lazy load an image:

<img src="..." alt="..." loading="lazy">

Keep in mind that only a small number of browsers actually support this feature at the moment!


Back to top