By SitemapFixer Team
Updated April 2026

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.

Audit your image sitemap
Find missing alt tags, broken image URLs, and format issues
Analyze My Sitemap

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>:

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

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:

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

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.

Frequently Asked Questions

Do I need a separate image sitemap?
Usually not. Google supports image entries inside your regular sitemap via the xmlns:image namespace. A separate image sitemap is only useful if you have millions of images or want to manage them independently. Most sites benefit more from good alt text, filenames, and structured data.
How many images can I list per URL?
Google allows up to 1,000 image:image entries per URL entry in a sitemap. In practice, listing the most important 5-10 images per page yields better results than dumping every decorative image.
Does Shopify generate an image sitemap automatically?
Shopify includes image:image entries inside its auto-generated sitemap.xml for products and collections. You cannot edit it directly, but the product's featured image and alt text flow through automatically. Apps like TinyIMG can extend this coverage.
Check your image sitemap coverage
Find missing image entries and broken URLs in 60 seconds
Analyze My Sitemap Free
Related Guides