Lazy load offscreen images
Lazy loading eliminates unnecessary image downloads on initial page load. A page with 20 images below the fold may transfer several megabytes of data that users who don't scroll will never see. Deferring these downloads reduces Time to Interactive, improves LCP for above-fold content, and saves bandwidth—particularly impactful for users on metered mobile connections.
Quick Reference
- Add
loading="lazy"to all<img>elements below the fold - Never lazy-load the LCP image (hero, first product image)—use
fetchpriority="high"instead - Always pair
loading="lazy"withwidthandheightattributes to prevent CLS - Native
loading="lazy"has universal support in all modern browsers—no JavaScript polyfill needed - If fold position is unclear from the snippet, do not invent a lazy-loading defect
Check
Scan all <img> elements in this codebase. Identify: 1) Any <img> elements below the fold (not in the first viewport) that are missing loading="lazy". 2) Any <img> elements marked loading="lazy" that appear to be above the fold (hero images, first product images, logos in headers). 3) Any <img> with loading="eager" below the fold. Report the …