Reference guide · images · Published 2026-08-15 · 3 min read
Image sitemaps: what they do
What an image sitemap does, the image XML namespace, when it helps, submitting it, and common validation errors.
- ·Why it works
- ·The XML structure
- ·Submission and errors
Why it works
A regular sitemap lists pages a crawler should index. An image sitemap lists images individually, inside the sitemap, using a second namespace. It tells the engine where each image lives and which page it belongs to. The engine can still discover images by crawling the page HTML, but an image sitemap is a direct pointer that helps pages where images are hard to reach: lazy-loaded galleries, lightboxed overlays, or images only injected from scripts.
It is a supplementary signal, not magic. On-page alt text and context from the image SEO guide still do the ranking; the sitemap does the discovery. Use it where you have a large, structured image set: e-commerce product photos, galleries, media pages.
The XML structure
The file is a normal sitemap with an extra namespace declaration, xmlns:image="http://www.google.com/schemas/sitemap-image/1.1", and <image:image> blocks inside each <url>:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>https://example.com/products/coastal-hoodie</loc>
<image:image>
<image:loc>https://example.com/media/coastal-hoodie-front.webp</image:loc>
</image:image>
<image:image>
<image:loc>https://example.com/media/coastal-hoodie-detail.webp</image:loc>
</image:image>
</url>
</urlset>
Rules for the values:
<image:loc>is the only field that matters today. The companion tagsimage:titleandimage:captionwere deprecated by Google and are ignored, so leave them out of new sitemaps. The legacyimage:geo_locationandimage:licensefields still parse if you have that data, but they are no longer required or rewarded.<image:loc>must be an absolute URL and reachable without a login.- Prefer the canonical site domain for image URLs. Google does allow cross-domain or CDN image hosting, but only when both hosts are verified in Search Console.
- One
<url>can hold many<image:image>blocks, up to 1000 images per page in Google's guidance. - Place
<loc>before the<image:image>blocks.
When it pays
- Galleries and portfolios where the images are lazy-loaded via script and the page HTML does not carry all
srcvalues. - Product catalogue pages where each item has multiple photos.
- Sites where geographical or editorial coverage is driven by photos (a newsroom).
It costs little and occasionally rescues discovery. Where the site already exposes all images in static HTML, the benefit is smaller.
Submitting and referencing
- Create
sitemap-images.xmlin the server root. - Reference the regular page sitemap, the image sitemap, or both in
robots.txt:
Sitemap: https://example.com/sitemap-images.xml
- In Google Search Console, submit the sitemap URL under Indexing and watch the Image coverage line.
Common validation errors
The report tool shows the errors:
| Error | Cause | Fix |
|---|---|---|
image:loc missing | Image block without required URL | add <image:loc> |
| Unsupported image format | engine ignores non-web formats | check for .webp, .jpg, .png |
| Too many URLs per sitemap | default cap 50000 | split into index |
| Image URL redirects | every image:loc should 200 OK | remove redirect chains in the CDN |
| Relative URL | image:loc uses an absolute URL | prefix with scheme and host |
Re-submit after large changes. The full picture of image search signals is in the image SEO guide. Serve the images the sitemap points to from a cached CDN with stable URLs, which the image optimisation guide covers under delivery.