Lazy loading is a performance technique that defers fetching non-critical resources until the user needs them, such as images below the fold or code for a route that has not been opened yet.
Why it matters
Loading less up front means faster initial rendering and lower data use. Browsers support it natively for images and iframes through an HTML attribute. Used wrongly it hurts: lazy loading the main hero image delays the largest contentful paint, and layout shifts occur if image dimensions are missing.
Example
<img src="hero.jpg" width="1200" height="600" alt="Hero">
<img src="gallery-1.jpg" width="400" height="300" alt="" loading="lazy">
The hero loads immediately; the gallery image loads only when the visitor scrolls near it.
Common mistakes
- Lazy loading the first visible image.
- Omitting width and height, causing the page to jump as images appear.
- Hiding content that must be indexed or found by in-page search behind scroll-triggered scripts.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.