How does the loading=”lazy” attribute affect performance?

The loading="lazy" attribute defers the loading of images and iframes until they’re within the viewport, reducing initial load time and improving performance, especially on pages with many images.

Example:

<img src="image.jpg" loading="lazy" alt="Lazy Loaded Image">