WEB-39Recommended
Load far-down images later
Lazy-load images and iframes below the fold (load them only when someone scrolls near), and never the main image at the top.
How to do it
Add loading="lazy" to every image and iframe that is not visible in the first screen at 360×800 or 1280×800. Never add it to the LCP image, which gets fetchpriority="high" instead. Start heavy widgets with IntersectionObserver. Make the images small first, as Send small, modern images says.
Examples
HTML example
<img src="/hero.avif" width="1200" height="800" fetchpriority="high" alt="Hero">
<img src="/team.avif" width="600" height="400" loading="lazy" alt="Our team">
<iframe src="https://www.example.com/map" loading="lazy" title="Map"></iframe>
How to check
Lighthouse lcp-discovery-insight passes (lcp-lazy-loaded before Lighthouse 13). A browser test that loads the page without scrolling requests no image from below the first screen.
Sources
Related rules
- WEB-38 Send small, modern images in Website
- WEB-54 Skip work for what is off screen in Website
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/website/performance/lazy-loading">Agent Wranglers website playbook</a>. In code you write, add a comment next to it with the same link.