Image Sitemap
An image sitemap tells Google about images it might not find by crawling, such as ones loaded with JavaScript. This guide shows the exact XML, every tag Google supports, the tags it removed, the 1,000-image limit, cross-domain rules, how to submit, and how to do it on WordPress.
- Copy-paste XML
- Tag reference
- Deprecated tags
- Submit and test
<url>
<loc>https://example.com/page/</loc>
<image:image>
<image:loc>.../photo.jpg</image:loc>
</image:image>
</url>Add an image:image element with an image:loc URL inside each page’s url entry. You can use a separate image sitemap or add image tags to your existing sitemap; Google considers both equally valid. Each page entry can hold up to 1,000 images. Image URLs may be on another domain if you verify both in Search Console. Google removed the caption, geo_location, title and license tags from its documentation.
What an image sitemap is
A normal sitemap lists page URLs. An image sitemap adds the images used on those pages, so Google can find them even when its crawler would not discover them from the HTML alone. Google’s guidance says it is especially useful for images found through JavaScript.
Discovery
Images Google may not otherwise find.
Rank images for you
It lists them; quality and relevance still decide what appears.
If you are new to sitemaps, start with robots.txt and sitemaps.
Do you actually need one?
| Situation | Image sitemap? | Why |
|---|---|---|
| Images in normal img tags on crawlable pages | Usually not essential | Google can discover them (my own judgement) |
| Images loaded by JavaScript | Helpful | Google’s stated use case |
| Image-heavy sites such as galleries | Helpful | Makes discovery more reliable |
| Images on a CDN domain | Helpful | Cross-domain listing is supported |
The XML, ready to copy
<?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://example.com/sample1.html</loc>
<image:image>
<image:loc>https://example.com/image.jpg</image:loc>
</image:image>
<image:image>
<image:loc>https://example.com/photo.jpg</image:loc>
</image:image>
</url>
<url>
<loc>https://example.com/sample2.html</loc>
<image:image>
<image:loc>https://example.com/picture.jpg</image:loc>
</image:image>
</url>
</urlset>xmlns:image namespace on the urlset element. Without it the image tags are not valid.Tag reference
| Tag | Status | What it does |
|---|---|---|
| image:image | Required | Wraps all information about one image; up to 1,000 per url |
| image:loc | Required | The image’s URL |
| image:caption | Removed | No longer in Google’s documentation |
| image:geo_location | Removed | No longer in Google’s documentation |
| image:title | Removed | No longer in Google’s documentation |
| image:license | Removed | No longer in Google’s documentation |
Images on another domain
Image URLs can be on a different domain from your pages, for example a CDN. Google says this works if you verify both domains in Search Console. Your robots.txt must also not block any content you want indexed. See Search Console setup for verification.
Publishing images well
An image sitemap helps discovery only. Google points to its general image best practices for everything else. The practical basics are in image SEO:
- Use descriptive file names and alt text.
- Use common formats and sensible dimensions.
- Place images near relevant text.
- Keep image URLs stable and crawlable.
Create and submit one step by step
Separate file or existing sitemap?
Either is valid. Adding image tags to your existing sitemap keeps things simple.
List pages and their images
For each page, list the image URLs that matter, up to 1,000 per page.
Write the XML
Use the template above, with the image namespace declared once.
Put it at a public URL
For example /image-sitemap.xml. Open it in a browser to confirm it loads.
Notes for WordPress sites
- Plugins may already include images. Many SEO plugins add image data to their post sitemaps. Open your sitemap and look for image tags before building another (my own advice). See Yoast SEO settings.
- Do not duplicate. Two sitemaps listing the same images is wasteful.
- CDN images. If your plugin rewrites image URLs to a CDN, verify that domain.
- Lazy-loaded images. A sitemap can help if lazy loading hides images from the crawler. See speed up WordPress.
Troubleshooting
| Symptom | Likely cause (my own diagnosis) | Fix |
|---|---|---|
| Sitemap has errors | Missing namespace or invalid XML | Validate the file |
| Images not appearing | Blocked by robots.txt | Allow the image folder |
| CDN images ignored | Domain not verified | Verify both domains |
| Old tags used | Caption, title or license tags | Remove them; they are no longer documented |
| Over 1,000 images on a page | Limit exceeded | List the most important ones |
Checklist
File
- Valid XML, UTF-8
- Image namespace declared
- image:image and image:loc used
- Public URL returns 200
Content
- Only images you want found
- Max 1,000 per page
- No deprecated tags
- Stable URLs
Access
- Images not blocked
- CDN domain verified
- No login required
- Good file names and alt text
Submit
- Submitted in Search Console
- Status Success
- No duplicates
- Rechecked monthly
What Google’s page does not say
Google does not promise that listed images will be indexed or shown, gives no ranking benefit for submitting an image sitemap and does not state a file size limit on that page beyond general sitemap rules. Treat it as a discovery aid.
Key terms
- Namespace
- An XML declaration that defines which tags are allowed.
- Sitemap
- A file listing URLs for search engines.
- CDN
- A network that delivers files from nearby servers.
- Deprecated
- No longer documented or recommended.
Common mistakes
Forgetting the namespace
Tags are then invalid.
Using removed tags
Caption, title and the like are gone.
Blocking images in robots.txt
They cannot be indexed.
Not verifying the CDN
Cross-domain needs both.
Duplicate sitemaps
Wasted effort.
Expecting rankings
It is discovery only.
Related guides
Image sitemap questions
Do I need a separate image sitemap?
No. You can add image tags to your existing sitemap; Google treats both as equally valid.
How many images per page can I list?
Up to 1,000 image:image tags per url entry.
Which tags are required?
image:image and image:loc.
Are caption and title tags still supported?
No. Google removed image:caption, image:geo_location, image:title and image:license from its documentation.
Can images be on another domain?
Yes, if you verify both domains in Search Console and robots.txt does not block them.
Why would I need one?
Mainly for images Google might not otherwise find, such as those loaded with JavaScript.
How do I submit it?
In Search Console under Indexing, then Sitemaps.
Will it improve image rankings?
Google does not claim that. It helps discovery.
The XML structure, tags, limit, cross-domain rule and removed tags come from Google’s image sitemap page. The need-one table, step-by-step routine, WordPress notes, troubleshooting table and checklists are my own.