Back to Blog

"Image Sitemaps Explained: How to Help Google Index Your Images"

Image sitemaps tell Google about images it might otherwise miss. Learn the XML syntax, common mistakes, and how to get your images indexed faster.

· · Updated Jul 20, 2026 · 8 min read

Google Images is a significant source of traffic for many websites — product photography, editorial illustrations, infographics, and visual content all benefit from proper image indexing. Yet most site owners never think about image sitemaps, leaving a meaningful slice of potential search traffic unclaimed.

Here is what image sitemaps are, why they matter, and how to implement them correctly.

What is an image sitemap?

An image sitemap is an extension of the standard XML sitemap that gives Google extra data about the images on each page. Instead of a separate file, you add <image:image> tags inside your existing <url> entries, each with the image's URL and optional title and caption. It helps Google find images it might otherwise miss — lazy-loaded, CSS-background, or JavaScript-rendered images.

An image sitemap is an extension of the standard XML sitemap format that provides Google with additional metadata about the images on each page. Rather than creating a separate file, you add image-specific tags inside your existing <url> entries. If the base format is unfamiliar, what an XML sitemap is covers the standard structure that image tags build on.

Google can discover images by crawling your pages normally, but image sitemaps help in situations where images might otherwise be missed:

  • Images loaded via JavaScript
  • Images embedded in CSS backgrounds
  • Images on pages with few inbound links
  • Large sites where not every page gets crawled frequently

The Googlebot Image crawler uses image sitemaps to prioritize which images to index and to understand context it cannot always infer from the page alone.

The <image:image> extension

Image sitemaps use the image: XML namespace, which extends the standard sitemap schema. Here is how a URL entry looks with image metadata included:

<?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/ceramic-mug</loc>
    <image:image>
      <image:loc>https://example.com/images/ceramic-mug-white.jpg</image:loc>
      <image:title>White ceramic mug with handle</image:title>
      <image:caption>Our best-selling 12oz ceramic mug, dishwasher safe</image:caption>
    </image:image>
    <image:image>
      <image:loc>https://example.com/images/ceramic-mug-detail.jpg</image:loc>
      <image:title>Ceramic mug base detail</image:title>
    </image:image>
  </url>
</urlset>

The supported tags within <image:image> are:

Tag Required Purpose
<image:loc> Yes The full URL of the image
<image:title> No Short title for the image
<image:caption> No Longer description or caption
<image:geo_location> No Geographic location depicted (e.g., "Paris, France")
<image:license> No URL to a license page for the image

You can list up to 1,000 images per <url> entry, though in practice keeping the count reasonable makes the sitemap easier to parse.

Why title and caption matter

The <image:title> and <image:caption> fields give Google textual context for your images that it cannot always derive from surrounding page content. This is especially important for:

Product images — the filename IMG_4821.jpg tells Google nothing. A title like "Navy blue wool overcoat, front view" tells Google a great deal.

Infographics — a caption summarizing the key takeaway helps Google understand what the image is about and match it to relevant queries.

Editorial photography — a descriptive caption aligned with the article topic reinforces the page's subject matter.

Think of <image:title> as the image's alt attribute for the sitemap, and <image:caption> as a sentence or two of additional context. Do not keyword-stuff these fields; write them for a human first.

Common image sitemap mistakes

Using relative URLs. The <image:loc> tag must contain an absolute URL including the scheme and domain. https://example.com/images/photo.jpg is correct. /images/photo.jpg is not.

Forgetting to declare the namespace. The xmlns:image declaration must be present on the <urlset> opening tag or the parser will reject the file entirely. This is the most common cause of image sitemaps being silently ignored.

Including images from CDN or third-party domains without coverage. If your images are served from a different domain (e.g., https://cdn.yoursite.com), Google needs to verify that domain via Search Console as well. Images on completely unrelated domains typically will not be indexed via your sitemap submission.

Listing images that return 404 or are blocked by robots.txt. Google will not index images it cannot access. Make sure the image URLs in your sitemap resolve to the actual image files, and that your robots.txt does not block the image directory. This is also why a current sitemap matters — swapped-out product photos leave dead image URLs behind, one of the ways a sitemap falls out of date.

Treating the image sitemap as a replacement for alt text. These are complementary signals, not substitutes. Your HTML alt attributes still matter for on-page SEO and accessibility. The sitemap is supplementary.

What about image sitemaps for JavaScript-heavy sites?

Single-page applications and sites that load images dynamically via JavaScript are exactly where image sitemaps provide the most value. Googlebot renders JavaScript, but rendering takes time and resources, and not every page gets fully rendered on every crawl.

If your images are loaded via component state, lazy-loading, or fetched from an API, they may never appear in a standard crawl. An image sitemap bypasses that problem entirely by explicitly providing the image URLs. This is a common pain point on modern stacks — the Next.js sitemap guide covers the same rendering issue for pages as well as images.

How Indexly handles image detection

When Indexly crawls your site, it parses each page's HTML and detects <img> tags, srcset attributes, <picture> elements, and Open Graph image tags. These are automatically included in the sitemap output alongside the standard URL data.

You do not need to configure anything separately. If your pages contain images, they appear in your sitemap. For sites with large image libraries — e-commerce catalogs, photography portfolios, news sites — this means your images are submitted to Google as part of the same automated workflow that keeps your page sitemap current.

The <image:title> field is populated from the image's alt attribute when present, which is another reason to write good alt text.


Image search is often the forgotten channel in an SEO strategy. A properly formatted image sitemap does not require much work to implement, and for visual-heavy sites it can meaningfully increase the number of images Google discovers and indexes. Start with the namespace declaration, get the <image:loc> tags right, and add descriptive titles wherever you can.

FAQ

What is an image sitemap?

An image sitemap is an extension of the standard XML sitemap that gives Google metadata about the images on your pages. You add <image:image> tags inside each <url> entry, each holding the image's URL and optional title, caption, geographic location, and license. It helps Google discover and index images it might otherwise miss during a normal page crawl.

Do I need a separate file for an image sitemap?

No. Image data lives inside your regular sitemap, not in a separate file. You declare the image namespace on the <urlset> tag, then add <image:image> blocks inside the <url> entries for pages that contain images. The same file lists both your page URLs and the images on each page.

How many images can one URL entry list?

A single <url> entry can list up to 1,000 images. In practice, keeping the count reasonable makes the sitemap easier to parse and manage. The overall file still obeys the standard sitemap limits of 50,000 URLs and 50MB uncompressed, so very large image libraries may need to be split across a sitemap index.

Does an image sitemap replace alt text?

No. Image sitemaps and HTML alt attributes are complementary, not substitutes. Alt text matters for on-page SEO and accessibility and stays essential. The image sitemap is a supplementary signal that helps Google find images. Good alt text also feeds the <image:title> field when tools generate the sitemap from your markup.

Generate your sitemap with Indexly — it detects images automatically and keeps them in a current, hosted sitemap.

Anas Shikh Al Srojieh

Anas Shikh Al Srojieh · Founder, indexly

Writing about SEO, sitemaps, and how to get every page indexed by Google.

Enjoyed this post?

Get our next one delivered to your inbox — no spam, ever.

Back to Blog

Ready to get your site fully indexed?

Get started free