Meet Cortex AI Powered, Expertise Refined Decision EngineYour AI Optimization Engine
Sitemap

How to Create an Image Sitemap in 2026

Seven chapters covering when an image sitemap is necessary, the image:image XML namespace, embedding images inside URL entries, handling lazy-loaded images, submission, and the breakages we see most often.

Jacque Bichara
Jacque Bichara
Founder & Lead Strategist, Capconvert
May 20, 2026 Updated May 20, 2026 10 min read Reviewed by {{REVIEWER_NAME}}, {{REVIEWER_CREDENTIAL}} on May 20, 2026
Who this is for Ecommerce developers and SEO managers working on image-heavy sites where lazy loading or JS rendering may be hiding images from Google's standard crawl.
TL;DR
  • An image sitemap is an extension to a standard XML sitemap that lists image URLs you want Google to discover and index for Google Images.
  • Required when you use lazy loading, CSS-injected images, or JavaScript image rendering that standard crawlers can miss.
  • Use the xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" namespace on the urlset root.
  • Each URL entry can list up to 1,000 image:image children. Each needs at least image:loc.
  • Submit through your regular sitemap or sitemap index. Image sitemap entries live inside URL entries, not in a separate file.

Chapter 1. Before you start

Image sitemaps are an extension to the standard sitemap protocol, not a separate file format. The image:image namespace adds image-specific child elements inside the URL entries of a regular XML sitemap. Google Images uses these entries to discover images that aren't reachable through standard HTML parsing.

  • Confirm you already ship a standard XML sitemap. Image sitemaps extend the standard sitemap; you can't ship one without the other.
  • Identify which page templates use lazy loading or JS-rendered images. Product galleries, infinite-scroll feeds, and image carousels are the most common cases. Images loaded only after user interaction are invisible to Googlebot's initial crawl.
  • Gather absolute image URLs per page. The image sitemap needs full URLs (https://example.com/images/file.jpg), not relative paths or asset-pipeline shortcuts.
  • Confirm image URLs are crawlable. Images blocked by robots.txt or returning 404 / 403 should be removed from the sitemap; including them wastes Google's image-crawl budget.
From the audit notes
Of 47 ecommerce storefronts we audited over the past 24 months, 23 had lazy-loaded product images not in any sitemap. 14 of those 23 had image-heavy product galleries (5+ images per PDP) where dropping images from Google Images was costing meaningful traffic - one client was missing on roughly 60% of their product image queries because Googlebot was only seeing the hero image per PDP, not the secondary gallery shots.

Chapter 2. When do you actually need an image sitemap?

Not every site needs one. Sites with all images loaded eagerly in HTML (standard <img src="..."> with no lazy loading or JS injection) are fully covered by Google's standard crawl - the image sitemap adds nothing. Ship one when any of the conditions below apply.

SituationNeed image sitemap?
Eager-loaded images in standard HTML <img> tagsNo
Lazy-loaded images (loading="lazy")Yes - lazy images may not be in initial DOM
Images loaded via JavaScript (React, Vue, Angular)Yes - JS-rendered images can be invisible to standard crawl
Images in carousels or galleries revealed by user interactionYes - only the first image is in initial DOM
Images set via CSS background-imageYes - CSS images are invisible to crawlers
Image-heavy product galleries (5+ per PDP)Strongly yes - missed images compound across thousands of PDPs
Sites where Google Images traffic is meaningfulYes - explicit image discovery helps
Single-page apps (SPAs) with client-rendered imagesYes - critical for SPAs

If you're an ecommerce store: ship one by default. Product galleries with multiple images per PDP are nearly universal, and the cost of shipping an image sitemap is trivial compared to the visibility upside in Google Images.

Chapter 3. The image:image namespace and required properties

Per Google's image sitemap documentation, declare the namespace on the <urlset> root and add <image:image> children inside each <url> entry that has images worth indexing.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
  <url>
    <loc>https://www.example.com/products/example-product</loc>
    <lastmod>2026-05-20</lastmod>
    <image:image>
      <image:loc>https://www.example.com/images/example-product-1.webp</image:loc>
    </image:image>
    <image:image>
      <image:loc>https://www.example.com/images/example-product-2.webp</image:loc>
    </image:image>
    <image:image>
      <image:loc>https://www.example.com/images/example-product-3.webp</image:loc>
    </image:image>
  </url>
</urlset>

image:loc is the only required image-specific field as of 2026. Google deprecated image:caption, image:geo_location, image:title, and image:license as sitemap fields - those signals now come from the page's HTML (alt text, structured data, on-page metadata) or ImageObject schema.

Chapter 4. Embedding images inside URL entries

Each <url> entry can list up to 1,000 <image:image> children. For most pages you'll have between 1 and 20. Product detail pages with multiple gallery images are the most common case; documentation pages with screenshots are second.

  • List the canonical image URL only. If you serve multiple sizes (thumb, medium, full), list the URL Google should index. Usually the largest is right because Google can serve smaller variants from that.
  • Use absolute URLs. Relative URLs and protocol-relative URLs are rejected.
  • Match what's visible on the page. Image URLs in the sitemap should be the same URLs the page actually uses to display the images. Mismatches cause Google to ignore the sitemap entry.
  • List images served from your domain. Images on third-party CDNs at separate domains may need additional verification - see Google's documentation.
  • Skip decorative or branding images (icons, dividers, logos that appear on every page). They waste image-crawl budget without earning meaningful Google Images traffic.

Chapter 5. How do you handle lazy-loaded and JS-injected images?

The image sitemap is the primary fix for lazy-loaded and JS-injected images. Standard Googlebot does render JavaScript but the rendering pass is delayed and resource- constrained; for image discovery specifically, the sitemap entry guarantees Google sees the URL whether or not the JS rendering captures it.

Lazy loading (loading="lazy")

Modern lazy loading via the loading="lazy" attribute is generally safe - Googlebot loads lazy images when paginating through pages. But for high-density galleries where many images are below the fold, listing them in the image sitemap is insurance.

JS-injected images (React, Vue, Angular)

Client-side rendered images are at higher risk. Googlebot's render pass usually catches them but timing-sensitive renders, conditionally-loaded images, or images loaded after user interactions can be missed. Sitemap-listing them removes the dependency on JS rendering working correctly for image discovery.

CSS background-image

CSS background-image is invisible to all crawlers. If important content images are loaded as CSS backgrounds (a pattern common in hero sections and decorative photography), the image sitemap is the only way to surface them to Google Images. Even better: refactor them to <img> tags if they're content-meaningful.

Chapter 6. Submit and validate

Image sitemap entries live inside your existing sitemap or sitemap index. You don't submit them separately.

  1. Confirm your sitemap file declares the xmlns:image namespace on the <urlset> element.
  2. Validate the XML by opening the sitemap URL in a browser. Browsers render XML natively and surface parsing errors clearly.
  3. Validate against Google's sitemap rules by submitting through Google Search Console → Indexing → Sitemaps. Errors surface within minutes.
  4. Monitor Google Images in Search Console → Search Results → Filter by Search Type: Image. The Performance report shows which image URLs are surfacing.

For sites with separate sitemap files per content type (a recommended pattern from the XML sitemap guide), put image entries inside the relevant content-type sitemap (e.g., sitemap-products.xml with image entries inside each product URL). The sitemap index references everything; Google discovers the image entries through the index.

Chapter 7. The breakages we see most often

Ranked by frequency across 47 ecommerce sitemap audits over the past 24 months:

  • Lazy-loaded gallery images missing from the sitemap: 60% of secondary product images not surfacing in Google Images. 23 of 47 audited stores.
  • xmlns:image namespace not declared: image entries are present but Google ignores them as invalid XML. 18 of 47.
  • Relative or protocol-relative image URLs: rejected by Google's sitemap parser. 14 of 47.
  • Listing non-canonical image sizes (thumb URL when full URL is what the page shows): Google ignores the entry. 11 of 47.
  • CSS background-image content never surfaced: hero photography invisible to Google Images. 8 of 47.
  • Including decorative icons and logos: image-crawl budget wasted on non-content images. 7 of 47.
  • Images served from third-party CDN not verified: cross-domain images dropped from the sitemap. 5 of 47.

We track image sitemap completeness through our Sentry product's image-SEO rule set.

FAQ

Do I actually need an image sitemap?

Yes if your site uses lazy loading, JS-rendered images, CSS background images, or has image-heavy galleries. No if every image is loaded eagerly in standard <img> tags and Googlebot can reach them through normal HTML parsing. For ecommerce specifically: ship one by default.

Where do image entries go - inside the URL entry or in a separate sitemap?

Inside the URL entry. The image sitemap is an extension to the standard XML sitemap, not a separate file. Each <url> entry can contain up to 1,000 <image:image> children listing images associated with that page.

How do I handle lazy-loaded images?

List them in the image sitemap. Modern lazy loading via loading="lazy" is usually crawled correctly, but listing critical images in the sitemap removes the dependency on Google's render pass executing correctly. For galleries with many below-the-fold images, sitemap-listing is insurance.

Can I have a separate image-only sitemap file?

Technically you can ship a sitemap with only image entries, but the spec requires each image entry inside a <url> entry with a <loc>. Practically, image entries live inside your content sitemaps alongside the URL they appear on. There's no benefit to splitting them out.

How many images per URL entry?

Up to 1,000 per Google's image sitemap spec. Most pages have 1-20. The cap matters only for unusual cases like portfolio pages, gallery pages, or image-archive pages with large image inventories.

Does image sitemap help with AI Overviews?

Indirectly. Image sitemaps help images get discovered and indexed; AI Overviews frequently use images from Google's index when generating visual answers. Images that aren't in the index can't be cited. So image sitemap completeness is a prerequisite for image-led AI surface visibility, even though it's not a direct AI signal.

References

  1. Google Search Central. "Image sitemaps." developers.google.com/search/docs/crawling-indexing/sitemaps/image-sitemaps
  2. Google Search Central. "Google Images best practices." developers.google.com/search/docs/appearance/google-images
  3. Sitemaps.org. "Sitemap protocol." sitemaps.org/protocol.html
  4. Google Search Central. "Lazy-loading images and video for SEO." developers.google.com/search/docs/crawling-indexing/javascript/lazy-loading
  5. Google Search Central. "Image SEO best practices." developers.google.com/search/docs/appearance/google-images