Skip to content
Enjoy 20% off for 12 months on all plans. Use promo code: HYPERGROWTHClaim it

Image Sitemap XML: How to Build One Google Will Actually Read

By Toy Wen Da, Co-Founder · · 7 min read · scored 90/100

An image sitemap xml file is a sitemap, or an extension to one, that lists the images on your pages so Google can find and index them, including images loaded with JavaScript that a normal crawl might miss. The first thing to do is check whether your current sitemap already includes image tags, since many platform-generated sitemaps skip them entirely.

Minimalist image of HTML keycaps against a gray background, perfect for digital and web design themes.

What an Image Sitemap XML Actually Looks Like

Google's own documentation describes two valid approaches: a standalone image sitemap, or image tags bolted onto your regular sitemap. Both are treated the same by Google's crawler. There's no ranking advantage to picking one over the other, it's a structural choice, not an SEO one.

Here's the shape of it, based on Google Search Central's documentation:

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

The Only Two Tags You Need

Google only requires two tags inside each image:image block:

Tag Purpose Required?
image:image Wraps the data for one image Yes
image:loc The image's full URL Yes
image:caption Deprecated by Google No, ignored
image:title Deprecated by Google No, ignored
image:geo_location Deprecated by Google No, ignored
image:license Deprecated by Google No, ignored

Older tutorials still tell you to add captions and titles. Google removed those from its documentation, so adding them does nothing harmful, but it also does nothing useful. Skip them and keep the file lean.

One limit worth knowing: each url element can hold up to 1,000 image:image tags. A product page with a handful of photos never comes close. A gallery page with thousands of images might need to split across multiple url entries or multiple sitemap files.

Flat illustration of simple shapes and icons

Fixing It Inside Your Own Website

Flat illustration of simple shapes and icons

How you fix a missing or broken image sitemap xml depends entirely on your platform. Here's the general path on the most common setups.

WordPress

If you're using Yoast SEO or a similar plugin, images are usually added to the sitemap automatically once the plugin's XML Sitemaps setting is turned on. Check under the plugin's General or Features settings for a sitemap toggle. If you built your sitemap manually or with a bare-bones plugin, you'll likely need a dedicated image sitemap extension, since the default WordPress sitemap doesn't include image tags on its own. If you're not sure what your current WordPress sitemap even contains, this breakdown of how to find, read, and fix your wp-sitemap.xml walks through it.

Shopify

Shopify's native sitemap doesn't include image tags, which is why third-party apps exist for this specific job. Easy Image Sitemap, for example, is listed from $5.12 SGD/month (roughly $4 USD) for stores with around 400 images, scaling up to $52.71 SGD/month for larger catalogs of 20,000 images, based on the app's published Shopify pricing. It builds the file, submits it to Search Console, and monitors indexing over time. Reviewers on the Shopify App Store give it a 4.9 out of 5 average across 29 reviews, with several merchants specifically crediting it for images that were submitted but showing zero indexing beforehand, a common symptom when images sit on a CDN domain Google hasn't fully verified.

Custom-Built or Static Sites

If your site is hand-coded or statically generated, you'll need to either generate the XML programmatically at build time or use a sitemap generator that supports the image namespace. A general-purpose crawler that outputs a standard sitemap is a good starting point, you can run one with the free XML Sitemap Generator, then layer in image tags manually or with a script if the generator doesn't support them natively.

After You Edit the File

Whichever route you take, finish with these steps:

  1. Confirm the file validates as XML (no unclosed tags, correct namespace declaration).
  2. Upload it to your site's root or wherever your other sitemaps live.
  3. Check that robots.txt doesn't block the image URLs or the folder they sit in.
  4. If images are hosted on a different domain (a CDN, for instance), verify that domain separately in Google Search Console.
  5. Resubmit the sitemap under Sitemaps in Search Console.

When Your Own Tools Are Enough, and When They Aren't

A black and white image of wrenches neatly hanging on a workshop wall.

This is the honest trade-off most articles skip. A free checker or a one-time manual fix is enough when you're troubleshooting a single URL, or confirming a sitemap is valid after a one-off edit. It's not enough when you're running an image-heavy catalog that changes weekly, because someone, or something, has to keep the sitemap current every time you add a product or a blog post.

Situation Free/manual route enough? Why
Checking one page's image tags are present Yes A single lookup, no ongoing maintenance needed
Validating a sitemap after a one-time fix Yes Static check, nothing to automate
A 50-page brochure site with rare image updates Yes Low volume, infrequent changes
A Shopify store adding products weekly Usually not Needs automatic resubmission on every change
A media site publishing dozens of images daily Usually not Manual regeneration can't keep pace
Diagnosing why specific images show "submitted, not indexed" Start free, escalate if unresolved Monitoring over time catches patterns a snapshot can't

If you're just confirming a fix worked, the Sitemap Checker will tell you in seconds. If you're managing hundreds of SKUs with images added every day, you want something that regenerates and resubmits the sitemap automatically, that's the gap apps and plugins exist to fill.

Common Mistakes

  • Assuming your platform's default sitemap includes images. Most don't, unless a plugin or app specifically adds image tags.
  • Blocking the image folder in robots.txt while still listing those images in the sitemap. Google can't index what it's told not to crawl.
  • Forgetting to verify the CDN domain in Search Console when images are hosted separately from the main site.
  • Adding deprecated tags like image:caption or image:license, thinking they help rankings. They're ignored.
  • Treating the sitemap as "set and forget" on a catalog that changes constantly, then wondering why new product images never get indexed.
  • Never checking Search Console's sitemap report after submission, which is often the only place you'll see a parsing error.

FAQs

Do I need a separate image sitemap, or can I add images to my existing one?

Either works. Google treats a standalone image sitemap and image tags added to your regular sitemap as equally valid. Pick whichever is easier for your platform to generate.

Why are my images submitted but not indexed?

This often happens when images are hosted on a separate domain, like a CDN, that hasn't been verified in Google Search Console. It can also happen if robots.txt blocks the image path, or if the images are low-quality, duplicated elsewhere, or simply not valuable enough for Google to prioritize indexing.

How many images can one sitemap entry include?

Up to 1,000 image:image tags per url element, per Google's documentation. Sites with more images per page typically need to split listings across multiple sitemap files.

Does an image sitemap xml improve my Google ranking?

Not directly. It improves the odds that Google finds and indexes your images, especially ones loaded via JavaScript that a standard crawl might miss. Ranking in image search still depends on relevance, image quality, and surrounding page content.

Can I use a plugin instead of writing the XML myself?

Yes, and for larger or frequently updated catalogs, that's usually the practical choice. WordPress plugins like Yoast SEO can generate sitemaps automatically, and Shopify apps such as Easy Image Sitemap handle building, submitting, and monitoring the file on an ongoing basis.

Check Your Image Sitemap Today

Start with the one check that tells you where you stand: run your current sitemap through the free Sitemap Checker and see whether image tags are present, valid, and reachable. If they're missing, you now know exactly which platform fix above applies to your setup. Once it's live, keep an eye on indexing status in Search Console over the following weeks, that's where image sitemap xml problems actually show up. If you want a fuller picture of what else might be holding your pages back in search, talk to the team.

See what this looks like on your own sitePaste a URL and SearchBlueprint scores it on the same content engine that scored this article, then names the fixes in the order they pay off.Get your free plan

Sources

About the author

SearchBlueprint researched, wrote and scored this article with the content pipeline our customers run on their own sites. The score in the byline is what our content engine gave this page before it published. Nothing here is reviewed by hand, which is the point: it is the product's output, published where anyone can check it.