SEO glossary
What is Lazy Loading?
Learn what lazy loading is—deferring offscreen resource loads until needed—and how to implement it without hiding content from crawlers or hurting Core Web Vitals.
Definition
Lazy loading is a performance technique that postpones loading of non-critical resources—images, iframes, video posters, or JavaScript modules—until they approach the viewport or a user interaction triggers them.
Lazy loading: speed by waiting
Lazy loading defers work until it is needed. Instead of downloading every image on a long ecommerce category page at once, the browser fetches thumbnails as the user scrolls. Instead of parsing a 2 MB admin chart library on the homepage, JavaScript code splitting loads that chunk only when the user opens /dashboard.
The SEO tension is simple: search engines and users both need critical content early; everything else can wait. Lazy loading optimizes the “everything else” without becoming an excuse to hide text from crawlers.
Types of lazy loading
| Resource | Mechanism | SEO note |
|---|---|---|
| Images | loading="lazy", Intersection Observer | Never lazy-load LCP hero |
| Iframes | loading="lazy" | Embeds below fold only |
| Video | preload="none", poster image | Poster should have alt text |
| JS modules | Dynamic import() | Route chunks delay CSR content |
| Comments/widgets | Third-party on scroll | Ensure article HTML is complete first |
Native image lazy loading
Modern browsers support declarative lazy loading:
<!-- Below the fold — defer -->
<img src="/images/team-photo.jpg" alt="Engineering team" loading="lazy" width="800" height="600">
<!-- Hero / LCP — load immediately -->
<img src="/images/hero-product.jpg" alt="Wireless headphones" loading="eager" fetchpriority="high" width="1200" height="800">
Benefits:
- No custom JavaScript library.
- Crawlers understand real
srcURLs in HTML. - Reduced bandwidth on initial fetch—faster parse for bots scanning long pages.
Anti-pattern: placeholder-only src
<!-- Risky for SEO if JS fails -->
<img data-src="/real.jpg" src="placeholder.gif" class="lazy">
If your lazy-load script never runs during JavaScript rendering, crawlers index a 1×1 placeholder—not your product photo or its alt text context. Prefer native loading="lazy" with real src, or ensure SSR outputs final URLs.
Lazy loading and Largest Contentful Paint
LCP measures when the largest above-the-fold content element paints. Lazy-loading that element delays LCP—a direct Core Web Vitals regression.
Rules of thumb:
- Identify LCP element per template (usually hero image or H1 block).
- Set
loading="eager"and avoiddisplay:noneuntil load. - Use responsive
srcsetwith appropriately sized files (image optimization). - Preload LCP image in
<link rel="preload" as="image">when critical.
JavaScript route lazy loading
SPAs split routes:
const Admin = lazy(() => import('./AdminPanel'));
Public marketing routes should not lazy load primary content behind spinners. Crawlers may not wait for chunk download + execution. SSR or prerender money URLs; lazy load authenticated admin sections freely.
Lazy loading iframes and embeds
Maps, reviews, and chat widgets bloat TTFB follow-up work. Defer with:
<iframe src="https://maps.example.com/embed" loading="lazy" title="Store location map"></iframe>
Ensure surrounding HTML contains NAP (name, address, phone) text—not only the map embed—for local SEO.
Infinite scroll vs lazy loading
Infinite scroll loads more list items as users scroll—often confused with lazy loading. SEO implications differ:
- Paginated archives with
<a href>page links are crawl-friendly. - Infinite scroll without crawlable alternatives can trap URL discovery.
If you infinite-scroll products, expose a ?page=2 fallback or XML sitemap entries for deep inventory.
Googlebot and lazy content
Googlebot simulates viewport scrolling for many pages, but:
- Timing and depth limits exist.
- Content behind “Load more” buttons without
<a href>may be missed. - Tabs that never render inactive panels hide text unless in HTML.
Lazy loading is for bytes, not for indexable copy.
Measuring lazy load impact
| Metric | Healthy lazy load | Problem signal |
|---|---|---|
| LCP | Stable or improved | Worse after enabling lazy |
| Total bytes (first visit) | Down | Unchanged—check implementation |
Crawl HTML image src | Real URLs | Placeholders only |
| Indexed image search traffic | Stable | Drops after deploy |
Compare Lighthouse “Defer offscreen images” audit with field LCP in CrUX.
Implementation checklist
- Audit templates for above-the-fold images—mark eager.
- Add explicit
widthandheightto prevent layout shift (CLS). - Replace legacy lazy-load libraries with native
loading="lazy"where possible. - Test with JavaScript disabled—images below fold can wait; heroes must show.
- URL Inspection: confirm rendered HTML contains final
srcfor key images. - Pair with compression and modern formats (WebP/AVIF) from image optimization.
Lazy loading in PWAs and service workers
Service workers may precache lazy assets on install—changing when loads occur offline. Keep document requests network-first so crawlers always attempt fresh HTML regardless of worker cache state.
How Crawlox helps with lazy loading audits
Crawlox captures image references and alt text from crawled HTML—flagging templates where src points to placeholders or critical product images lack attributes. Cross-reference with Core Web Vitals reports to find pages where aggressive lazy loading trades crawl clarity for marginal byte savings.
Related terms
Frequently asked questions
Does lazy loading hurt SEO?
Not when implemented correctly. Native lazy loading and proper src attributes keep content discoverable. Lazy-loading above-the-fold LCP images or hiding text in unloaded modules can hurt rankings.
What is the HTML lazy loading attribute?
loading="lazy" on <img> and <iframe> tells browsers to defer offscreen loads. loading="eager" forces immediate load for hero images.
Do search engines execute lazy loading?
Googlebot renders pages and can load lazy resources when scrolling is simulated, but do not rely on scroll for critical content. Put important text in HTML, not behind unloaded tabs.
Should I lazy load all images?
No. Lazy load below-the-fold images only. The Largest Contentful Paint candidate should load eagerly with fetchpriority="high" when appropriate.
Is lazy loading the same as code splitting?
Related but different. Code splitting lazy loads JavaScript bundles; image lazy loading defers media bytes. Both reduce initial payload.
References
Explore authoritative guidance and frameworks related to lazy loading.
Explore every glossary definition
Return to the glossary to search by term, alias, starting letter, or category.