Lazy Loading
A technique to defer loading of images and iframes that are outside the visible viewport, speeding up initial page load.
Lazy loading is an approach where resources (images, videos, iframes) load only when the user scrolls to their location. It reduces initial load time and data transfer, especially on pages with many media elements.
Native lazy loading (HTML attribute)
<img src="image.jpg" alt="description" loading="lazy">
<iframe src="video.html" loading="lazy"></iframe>Browser support: Chrome 77+, Firefox 75+, Safari 15.4+, Edge 79+. The `loading="lazy"` attribute requires no extra JavaScript and is supported by Googlebot.
JavaScript solutions (for older browsers)
- lazysizes – popular library with responsive image support.
- Intersection Observer API – native API to detect when an element enters the viewport.
- lozad.js – lightweight (~1.9 KB) library.
SEO impact of lazy loading
Googlebot supports native lazy loading and correctly sees such images. For JavaScript implementations, ensure that the initial HTML contains a real src (or data-src) so the bot can discover it. Alternatively, use a `<noscript>` tag with a standard image.
Common questions
Discuss your project?
Share your goals and website context — I will suggest a practical next step.