What does Google say about SEO? /
Quick SEO Quiz

Test your SEO knowledge in 3 questions

Less than 30 seconds. Find out how much you really know about Google search.

🕒 ~30s 🎯 3 questions 📚 SEO Google

Official statement

To ensure the indexing of images with lazy loading, they must be visible in the rendered HTML after JavaScript has loaded the sources. Using the 'loading' attribute in HTML can be helpful, or checking through testing tools like the mobile-friendly test.
35:59
🎥 Source video

Extracted from a Google Search Central video

⏱ 49:04 💬 EN 📅 26/03/2020 ✂ 10 statements
Watch on YouTube (35:59) →
Other statements from this video 9
  1. 1:36 Bloquer JS et CSS dans robots.txt : erreur SEO ou stratégie légitime ?
  2. 2:39 Le JavaScript bloqué rend-il vraiment votre contenu invisible à Google ?
  3. 4:10 Le scroll infini pose-t-il vraiment un problème d'indexation Google ?
  4. 9:28 Les polices tierces freinent-elles vraiment votre SEO ?
  5. 10:32 Comment tester efficacement le lazy loading des images pour le SEO ?
  6. 12:48 Comment optimiser la vitesse d'un site JavaScript pour le référencement sans tout casser ?
  7. 16:26 Le sitemap XML suffit-il vraiment à compenser un maillage interne défaillant ?
  8. 23:58 Googlebot réécrira-t-il vos titres et métadescriptions générés en JavaScript ?
  9. 44:06 Comment gérer efficacement les erreurs 404 dans une application monopage ?
📅
Official statement from (6 years ago)
TL;DR

Google indexes images with lazy loading only if they become visible in the rendered HTML after JavaScript execution. The native HTML attribute 'loading' facilitates this compatibility, but it doesn't guarantee anything if your JavaScript implementation is flawed. In practical terms: test the rendering via the Mobile-Friendly Test to ensure Googlebot can see your image sources.

What you need to understand

Why does Google impose this constraint on rendered HTML?

Googlebot works in two stages: crawling the raw HTML, then rendering JavaScript to extract the final content. If your lazy-loaded images only appear client-side without leaving a trace in the DOM after JS execution, Google will never see them.

The classic pitfall? Scripts that inject the src or srcset attributes only on user scroll. Googlebot does not always emulate a complete scroll of a page — it focuses on the initial viewport and what JS loads automatically. If your script waits for a real scroll event to load the image, that image remains invisible for indexing.

Does the 'loading' attribute really solve all problems?

The native loading="lazy" attribute provides a decisive advantage: it keeps the image URLs directly in the source HTML, even before JavaScript execution. The browser (and Googlebot) can thus detect the image as soon as it parses the DOM.

But be careful — if you combine this attribute with a third-party JS library that rewrites URLs or masks sources, you nullify the benefit. Some hybrid implementations use data-src alongside loading="lazy", creating a dangerous redundancy if the script does not properly synchronize both.

How can I check if Googlebot really sees my images?

The Mobile-Friendly Test from Google simulates the rendering as Googlebot perceives it. Paste your URL, wait for the full rendering, then check the "Rendered HTML" tab or the final screenshot. If your images appear with their correct src attributes, you're in good shape.

A more comprehensive alternative: Search Console > URL Inspection. Request a live test, then examine the screenshot and the rendered HTML. Specifically, look for <img> tags — their attributes should contain the real URLs, not placeholders or temporary data-URIs.

  • Googlebot only indexes what it sees in the final rendered HTML, after complete JavaScript execution
  • The native attribute loading="lazy" exposes the URLs as soon as HTML parsing occurs, facilitating indexing
  • Scripts that inject sources on user scroll pose problems — Googlebot does not always emulate this behavior
  • Always test with Mobile-Friendly Test or Search Console Inspection to validate rendering
  • Beware of third-party JS libraries that rewrite src attributes in a way incompatible with the crawler

SEO Expert opinion

Is this statement consistent with what we observe on the ground?

Yes, and it’s actually a harsh reminder for those still using outdated lazy loading scripts. Older libraries like LazyLoad.js (pre-2019 versions) kept images out of the DOM or in data-* attributes until user scroll. The result: Google indexed zero images on pages that were rich in visual content.

Since the widespread adoption of the native loading="lazy" (supported by Chrome since 2019, followed by Firefox and Edge), issues have decreased — but persist among those who maintain legacy code or stack multiple lazy loading solutions inconsistently. I’ve seen sites lose 40% of Image SEO traffic after a redesign where they migrated to an incompatible JS library.

What nuances should be added to this recommendation?

Martin Splitt remains deliberately vague on a key point: Does Googlebot trigger lazy loading of images outside the initial viewport? The official documentation states that it "can" scroll, but offers no guarantees. In practice, tests show that Google indexes images from the above-the-fold section better than those at the bottom of the page. [To be verified] depending on your vertical and the richness of your visual content.

Another gray area: images in background-image CSS loaded via JavaScript. Splitt does not mention them, but they pose a problem — Google does not systematically extract them, even if they appear in the render. If your Image SEO strategy relies on CSS-in-JS for critical visuals, you are taking a risk.

In what cases is this rule insufficient?

If your site uses server-side rendering (SSR) or static generation (Next.js, Nuxt, etc.), the initial HTML already contains the complete <img> tags. Native lazy loading then applies client-side only — Googlebot sees everything from the first crawl, without depending on JavaScript rendering. Splitt's recommendation becomes almost ancillary.

Conversely, full client-side rendering sites (classic React SPA, Vue without SSR) need to be ultra-vigilant. If your Image component mounts to the DOM after the first paint and lazy loading triggers after a user interaction, Google will see nothing. The Mobile-Friendly Test does not simulate clicks, hovers, or deep scrolls — it loads the page and waits a few seconds. That’s it.

Warning: Critical images for SEO (e-commerce products, editorial visuals at the top of the article) should NEVER be in lazy loading. Load them eagerly (loading="eager" or without an attribute) to ensure their immediate indexing and consideration in Core Web Vitals (LCP).

Practical impact and recommendations

What should be done concretely to secure indexing?

First step: audit your current implementation. Identify which lazy loading method you are using — native attribute, third-party JS library, or custom script. If you stack multiple solutions (for example, Intersection Observer + loading="lazy"), simplify by keeping only the native attribute for modern browsers.

Next, test page by page on critical templates: product sheets, blog articles, SEO landing pages. Use Search Console > URL Inspection > Test URL live, then examine the screenshot and rendered HTML. Look for <img> tags and verify that their src or srcset attributes contain real URLs, not placeholders like data:image/svg+xml or empty paths.

What errors should absolutely be avoided?

Never leave critical images (hero image, main product visual) on lazy loading. These elements must be available immediately in the source HTML, without depending on any script. Use loading="eager" or simply omit the attribute to force immediate loading.

Avoid JS libraries that completely rewrite the DOM to inject images. Some "advanced" solutions replace <img> with <div> with background-image, which completely breaks indexing. Googlebot looks for semantic <img> tags — everything else is ignored or misinterpreted.

How can I ensure my site remains compliant over time?

Set up automated monitoring using tools like Screaming Frog in JavaScript mode or OnCrawl with JS rendering enabled. Configure alerts if the number of detected images drops sharply — a sign that a deployment has broken lazy loading.

In parallel, track your Image SEO impressions in Search Console. A sudden collapse in impressions without content changes often indicates a rendering issue. Cross-reference this metric with Coverage and Core Web Vitals reports to quickly detect regressions.

  • Prioritize the native attribute loading="lazy" on all non-critical images
  • Force loading="eager" or absence of attribute on above-the-fold visuals and strategic SEO images
  • Test each critical template using Mobile-Friendly Test and Search Console Inspection
  • Audit the rendered HTML to verify the presence of correct src/srcset attributes
  • Eliminate incompatible or redundant third-party JS libraries with the native attribute
  • Monitor Search Console > Performance > Images metrics to catch regressions
Indexing images with lazy loading relies on a rigorous technical implementation. If your front-end stack is complex (React SPA, partial hydration, hybrid SSR), or if you manage a large e-commerce catalog with thousands of visuals, these optimizations can quickly become a time-consuming project. In this context, working with an SEO agency specialized in technical aspects and JavaScript SEO may prove wise to secure your indexing without overburdening your development teams with iterative testing.

❓ Frequently Asked Questions

L'attribut loading="lazy" suffit-il pour garantir l'indexation par Google ?
Oui, si vous l'utilisez seul sans bibliothèque JS tierce qui réécrit les attributs src. L'attribut natif expose les URLs dès le parsing HTML, ce que Googlebot détecte facilement. Mais testez toujours via Mobile-Friendly Test pour valider le rendu final.
Googlebot indexe-t-il les images en bas de page, hors du viewport initial ?
Google dit qu'il "peut" scroller, mais ne le garantit pas. En pratique, les images du premier écran sont mieux indexées. Pour les visuels stratégiques en bas de page, envisagez un chargement eager ou testez leur présence dans le HTML rendu via Search Console.
Puis-je utiliser une bibliothèque comme LazyLoad.js avec l'attribut natif ?
C'est possible, mais risqué si la bibliothèque réécrit les attributs src ou crée des conflits. Privilégiez l'attribut natif seul pour les navigateurs modernes, et gardez un fallback JS uniquement pour les anciens navigateurs si vraiment nécessaire.
Les images en background-image CSS sont-elles indexées par Google ?
Non, ou très mal. Google privilégie les balises <img> sémantiques. Si vos visuels critiques sont en background-image chargés via JavaScript, ils risquent de ne jamais apparaître dans Google Images.
Comment tester rapidement si mes images lazy sont bien vues par Googlebot ?
Utilisez Search Console > Inspection d'URL > Tester l'URL en direct. Consultez le screenshot et le HTML rendu — vérifiez que les balises <img> contiennent des attributs src avec les vraies URLs, pas des placeholders ou des data-URIs.
🏷 Related Topics
Domain Age & History Crawl & Indexing AI & SEO Images & Videos JavaScript & Technical SEO Mobile SEO Web Performance

🎥 From the same video 9

Other SEO insights extracted from this same Google Search Central video · duration 49 min · published on 26/03/2020

🎥 Watch the full video on YouTube →

Related statements

💬 Comments (0)

Be the first to comment.

2000 characters remaining
🔔

Get real-time analysis of the latest Google SEO declarations

Be the first to know every time a new official Google statement drops — with full expert analysis.

No spam. Unsubscribe in one click.