Loading...
<img src="hero.jpg" alt="Team at work"
loading="lazy"><img src="hero.jpg" alt="Team at work" width="1200" height="600">
<img src="chart.png" alt="Sales chart" width="800" height="400" loading="lazy">The hero loads at once, and only the image further down the page is lazy loaded.
loading='lazy' on the hero image, which delays the largest paint.loading='lazy'.width and height so the layout does not jump when they load.loading='lazy' is used instead of a JS lazy loading library with data-src.'eager', the default, loads at once. 'lazy' delays loading until the element is near the viewport.
Yes. It works on <img> and <iframe> elements.
Not for plain lazy loading. Use it only for custom behavior the attribute cannot do.