Image Sitemap: How to Create One for SEO
An image sitemap is an XML file (or a section inside your main sitemap) that tells Google which images appear on each page of your site. It is the most reliable way to get images indexed in Google Images - especially for images loaded via JavaScript or CSS backgrounds. This guide shows the exact XML format, what tags are supported, limits, and how WordPress and Shopify handle image sitemaps out of the box.
What an image sitemap does
An image sitemap uses Google's image namespace (http://www.google.com/schemas/sitemap-image/1.1) to associate images with the pages they appear on. Each URL entry can contain up to 1,000 <image:image> children, each describing one image. Google uses this data to surface images in Google Images, enrich search snippets, and match images to queries. Without it, Google relies on crawling and rendering - which misses lazy-loaded, CSS-background, or CDN-hosted images.
When you need a separate image sitemap vs inline image tags
Inline image tags inside your existing sitemap are the recommended approach for most sites: you add the image namespace to the <urlset> element and put <image:image> children inside each <url> entry. A fully separate image sitemap (a standalone file listing only image entries) is useful when you have millions of images, run a dedicated stock photo or media site, or want to isolate image indexing status from page indexing in Search Console reports.
XML format and supported tags
Google currently supports four image tags inside <image:image>:
<image:loc>(required) - absolute URL of the image file.<image:caption>(optional) - a caption describing the image.<image:title>(optional) - the image title.<image:license>(optional) - URL to a page describing the image license.
Google deprecated image:geo_location and image:family_friendly in 2022 - they are now ignored. Alt text is still read from the page HTML, not the sitemap.
Image sitemap XML example
<?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/products/leather-boots</loc>
<image:image>
<image:loc>https://cdn.example.com/boots-main.jpg</image:loc>
<image:title>Handmade Leather Boots</image:title>
<image:caption>Full-grain leather ankle boots, brown.</image:caption>
<image:license>https://example.com/image-license</image:license>
</image:image>
<image:image>
<image:loc>https://cdn.example.com/boots-side.jpg</image:loc>
<image:title>Leather Boots Side View</image:title>
</image:image>
</url>
</urlset>Limits and best practices
- 1,000 images per URL entry - hard Google limit. Use multiple URL entries or paginate if needed.
- 50,000 URL entries and 50 MB per sitemap file - the standard sitemap limits still apply.
- Only list images you own or have rights to - Google can surface license info in Images results.
- Use absolute URLs - relative paths are not allowed.
- Do not block images in robots.txt - if Googlebot cannot fetch the image file, the entry is discarded.
- Quality over quantity - list meaningful content images, not icons, pixels, or decorative sprites.
How WordPress and Shopify handle image sitemaps
WordPress: Yoast SEO and Rank Math both include inline image entries in their sitemap_index.xml by default. They scan post content for <img> tags and featured images, then add image:loc children. All in One SEO offers the same behavior under Sitemap Settings. No extra configuration needed. Shopify: the auto-generated sitemap.xml already contains image entries for product and collection images, pulled from the product's featured image and gallery. You cannot edit the file, but optimizing product alt text and images flows through automatically. Apps like TinyIMG or SEO King can extend image sitemap coverage to blog posts and pages.
Submitting to Google Search Console
If your image entries live inside your main sitemap, no extra submission is needed - Google indexes them alongside URLs. For a standalone image sitemap, open GSC Indexing > Sitemaps, enter the path (e.g. /image-sitemap.xml), and click Submit. Monitor the Pages and Performance on Search > Search type: Image reports to confirm indexing. Add the sitemap URL to a Sitemap: line in robots.txt so other crawlers find it too.
Image sitemap vs image schema vs srcset - they're not the same thing
I audit a lot of sites that pile all three on, thinking more is better. They do different jobs:
Image sitemap helps discovery. Its job is to tell Google "these images exist on this URL, please crawl them." It doesn't affect ranking directly.
ImageObject schema (JSON-LD) describes the image semantically - what it depicts, who owns it, licensing, content creator. Schema is what drives the licensable badge in Google Images and context-rich snippets.
srcset and sizes are performance features. They help the browser pick the right resolution for the viewport. They have zero SEO effect beyond the Core Web Vitals bump from faster loads.
Getting all three wrong in different ways is common. Getting one right usually beats doing all three half-well.
Most sites don't actually need an image sitemap
Here's the hot take: image sitemaps rarely move rankings. Google's image crawler is good at finding <img> tags in rendered HTML. If your images load in regular img tags with alt text, on pages that are already indexed, Google finds them. I've run controlled tests where I added image sitemap coverage to 200 posts and saw maybe 4% lift in Image search impressions. Worth it? Debatable.
Where image sitemaps earn their keep:
- Lazy-loaded images behind IntersectionObserver. Googlebot doesn't scroll. Images below the fold that require user scrolling to load can get missed.
- CSS background-image everywhere. No
<img>tag, no discovery unless you sitemap it. - CDN-hosted images on a domain you don't control with GSC. Sitemap is the only way to associate the image with your URL.
- E-commerce with 100+ images per product page loaded via JS carousel. Heavy carousels often hide images from the crawler entirely.
- Google Discover optimization. Discover loves high-quality images and image sitemaps help it find the best candidates on your site.
If none of those apply - your site has normal <img> tags with alt text, loaded server-side or with native lazy loading - skip the image sitemap. Spend the time on alt text quality and filename hygiene instead.
A real case: a travel blog and Google Discover
A travel blog I worked with in 2025 had ~900 posts averaging 15 high-res photos each. All lazy-loaded. Google Discover traffic was inconsistent - maybe 2k visits a month from it when the niche should've been pulling 10x that.
We built an image sitemap with 8-10 images per post (the hero and key destination shots, not gallery miniatures). GSC Discover traffic went from 2.1k/month to 14k/month over 10 weeks. Image search traffic doubled too.
Worth noting: we also added ImageObject schema with creator and copyrightHolder, and fixed alt text across every included image. The sitemap was necessary but not sufficient on its own.
Common mistakes I keep running into
- Listing every decorative image. Icons, social share buttons, footer logos - Google throws away these entries and it dilutes trust in the meaningful ones.
- Image URLs on a different domain than the page URL. Still works, but you lose association unless the image domain is verified in GSC.
- Using deprecated tags.
image:geo_locationandimage:family_friendlywere killed in 2022. Remove them - they're not just ignored, they trigger sitemap parse warnings on some crawlers. - Listing images blocked by robots.txt. I audit sites monthly where
Disallow: /wp-content/uploads/exists alongside an image sitemap pointing to those exact URLs. Every entry fails. - Same image URL on 500 different page URLs. Legal if the image legitimately appears on each, but Google often picks one canonical association and drops the rest.
How to diagnose image indexing issues
GSC doesn't have a dedicated image indexing report. Three workarounds:
# 1. Check impressions in Search type: Image # GSC > Performance > Search type dropdown > Image # 2. Verify image is crawlable with Googlebot-Image UA curl -I -A "Googlebot-Image/1.0" \ https://cdn.example.com/image.jpg # 3. site:example.com on images.google.com # Shows a rough sample of what Google has indexed
If none of your images show up in images.google.com for a site: query, something is blocking them - usually robots.txt, X-Robots-Tag, or hotlink protection that treats Googlebot-Image as abuse.