Part of the SiteMap Series
In the previous lesson, you saw why specialised sitemap types exist and which ones Google supports. Image sitemaps are the first ones worth covering in depth because they apply to more sites than the other specialised types do.
Most sites have images. Many sites have lots of them. And the value of getting those images properly indexed has grown significantly in the AI Search era. Google Images remains a substantial traffic source on its own. On top of that, multimodal AI assistants pull from indexed images when answering visual queries, which means image discoverability is no longer just about image search. It is about all the surfaces that need to find an image to answer a question.
This lesson covers why image sitemaps matter more now than they used to, what the image sitemap XML elements look like, how to create one through the three main paths (WordPress with an SEO plugin, manually with XML, or with a static site generator), the protocol limits and rules to know about, common gotchas, and how to submit and validate your image sitemap.
Why image sitemaps matter in 2026
Image sitemaps tell search engines, primarily Google but Bing and others too, which images exist on your site and what they are. That second part is the key one. Without an image sitemap, the engines rely entirely on what they can extract from each page: the image’s src URL, its alt text, and the surrounding HTML context. That is enough for most images, but it is incomplete.
With an image sitemap, you can give the engines additional structured information about each image: its title, its caption, its geographic location (for photos with a real-world subject), and licensing information. The engine indexes those details directly, which means richer search results in Google Images and better matching for multimodal AI queries.
Three shifts have made image sitemaps more useful than they were a few years ago.
The first is the rise of multimodal AI search. Assistants like ChatGPT, Copilot, and Gemini increasingly pull images into their answers when a query has a visual component. Those images come from indexed sources, which means the engines doing the indexing benefit from rich image metadata. An image sitemap is one of the cleanest ways to provide that metadata.
The second is the growing importance of image search as a discovery channel in its own right. Google Images has not lost relevance; if anything, image-first queries have grown as visual content has become more common. Sites that show up well in image results capture a meaningful slice of traffic that pure text search misses.
The third is the proliferation of lazy-loading and JavaScript-rendered images. Modern sites delay loading images until they are needed for performance reasons, which sometimes hides those images from crawlers entirely. An image sitemap declares the images explicitly, regardless of whether they are present in the initial HTML.
What image sitemap elements look like
The image sitemap protocol extends the standard URL sitemap with <image:image> child elements inside each <url> block. The namespace is declared at the top of the file, and each URL can contain up to 1,000 image entries.
A minimal image sitemap entry looks like this:
<url>
<loc>https://example.com/products/blue-vase/</loc>
<image:image>
<image:loc>https://example.com/images/blue-vase-front.jpg</image:loc>
</image:image>
</url>
That is enough to declare the image to Google. The <image:loc> element is the only required field inside <image:image>. It holds the full URL of the image file itself, not the page that contains the image.
A richer entry uses the optional elements for more metadata:
<url>
<loc>https://example.com/products/blue-vase/</loc>
<image:image>
<image:loc>https://example.com/images/blue-vase-front.jpg</image:loc>
<image:title>Hand-thrown Blue Ceramic Vase</image:title>
<image:caption>Front view of a 30cm hand-thrown blue ceramic vase</image:caption>
<image:geo_location>Stoke-on-Trent, England</image:geo_location>
<image:license>https://example.com/license/</image:license>
</image:image>
</url>
Four optional elements are worth knowing about.
image:title. A short title for the image. Useful for product photos, gallery items, or named photographs.
image:caption. A longer description of what the image shows. The text in this element complements the alt text on the page itself.
image:geo_location. The real-world location depicted in or associated with the image. Useful for travel photography, real estate listings, or location-specific products.
image:license. The URL of a page describing the licensing terms for the image. Important for sites that license their imagery (stock photo sites, professional photographers) or that want to participate in Google’s licensable images programme.
You can list multiple <image:image> elements inside a single <url> block if the page has multiple images. Up to 1,000 per URL.
How to create an image sitemap
You have three reasonable paths depending on your stack.
1. Using a WordPress plugin
Most modern WordPress SEO plugins generate image sitemap entries automatically when you enable them, integrated directly into the standard URL sitemap rather than as a separate file.
Yoast SEO includes images in its main sitemap by default. You do not need to enable anything explicitly. When Yoast generates the sitemap, it scans each post and page for images (from the post thumbnail, the post content, and certain custom field locations) and adds <image:image> elements for them inside the URL blocks.
Rank Math has explicit image sitemap settings under SEO > Sitemap Settings > General. Toggle Include Images on (it usually is by default), and Rank Math handles image discovery on each URL automatically.
All in One SEO also includes images in its sitemap by default. The setting lives under All in One SEO > Sitemaps > General Sitemap > Include Images.
All three plugins discover images through the post thumbnail, the post content (parsing for img tags), and gallery shortcodes. Custom-field-based images (from Advanced Custom Fields, for example) may not be picked up automatically, depending on the plugin. If you have important images outside the post body and the featured image, check whether your plugin extracts them or whether you need a supplementary configuration.
The plugin path covers most WordPress sites without further work. Submit the standard sitemap to Search Console as before, and the engines pick up the embedded image metadata automatically.
2. Manually with XML
For non-WordPress sites where you have control over the sitemap file directly, the manual approach is straightforward.
Start with the standard URL sitemap structure from Lesson 5 of Module 2: How to Build a Website Sitemap Manually with XML. Add the image namespace declaration to the opening <urlset> tag:
<?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">
Then inside each <url> block that has images, add <image:image> child elements for each image:
<url>
<loc>https://example.com/portfolio/sunset-shoot/</loc>
<lastmod>2026-05-15</lastmod>
<image:image>
<image:loc>https://example.com/photos/sunset-01.jpg</image:loc>
<image:title>Sunset over the Atlantic</image:title>
</image:image>
<image:image>
<image:loc>https://example.com/photos/sunset-02.jpg</image:loc>
<image:title>Sunset reflection in tide pool</image:title>
</image:image>
</url>
Save the file with a .xml extension, upload it to your site root (or wherever your existing sitemap lives), and submit it through Search Console as covered in Module 2.
For sites with many images, manual maintenance becomes impractical fast. If you have more than a few dozen images, switch to a generator (WordPress plugin or static generator) rather than maintaining the XML by hand.
3. With a static site generator
If your site uses Next.js, Astro, Eleventy, or another static or hybrid framework, sitemap generation is usually handled by a plugin specific to that framework. The image sitemap layer is typically a configuration option in that plugin.
Next.js with next-sitemap. The next-sitemap package supports image entries through a custom transform function. Define the function in next-sitemap.config.js to scan your content for images and emit the appropriate <image:image> elements. The package documentation has working examples for the most common patterns.
Astro with @astrojs/sitemap. The official Astro sitemap integration supports image entries through the customPages and serialise options. Images are added by extending the serialise function to include image metadata from your content collections.
Eleventy with @11ty/eleventy-plugin-sitemap. Eleventy’s sitemap plugin supports custom transforms similar to next-sitemap. Configuration is done in your Eleventy config file.
For all three, the principle is the same: the generator scans your content during build, finds the images referenced, and adds the appropriate image sitemap elements to the output sitemap. Configure once, and every subsequent build keeps the image sitemap current automatically.
Image sitemap limits and rules to know about
A few rules apply specifically to image sitemaps on top of the standard sitemap protocol limits covered in Module 1.
- Up to 1,000 images per URL. Each
<url>block can contain at most 1,000<image:image>elements. For pages with massive image galleries, this is rarely a problem in practice, but it is the hard upper limit. - Images and URLs must share the verified domain. The page URL and the image URLs must both belong to a domain you have verified in Search Console. You cannot include images hosted on a CDN with a different domain unless that CDN domain is also verified, or the CDN serves images under a subdomain of your main domain.
- Standard sitemap limits still apply. The 50,000 URL and 50MB uncompressed file size limits apply to the whole file. Adding image metadata to every URL block can push a file closer to the 50MB limit faster than a URL-only sitemap would. If you have a large site with many images per URL, you may need to split into multiple sitemaps via a sitemap index sooner than you would otherwise.
- Image URLs should return 200 status codes. As with the standard sitemap, images listed in the sitemap should resolve directly. An
<image:loc>that returns 404 sends a misleading signal. Validate image URLs the same way you validate page URLs (covered in Lesson 10 of Module 2: How to Validate Your Website Sitemap).
Common gotchas to avoid
Five issues come up regularly with image sitemaps.
1. Hotlinked images cannot be included
If your site embeds images hosted on someone else’s domain (Unsplash, a stock photo CDN, another site’s media library), those images should not be in your image sitemap. The protocol requires image URLs to be on a domain you control. Including hotlinked images either fails verification or signals to the engines that you are claiming ownership of someone else’s content.
2. Lazy-loaded images may not be discovered automatically
Modern lazy-loading techniques delay image loading until the user scrolls to them. Most plugins handle this correctly by detecting the underlying image URLs from the page’s HTML, but some custom lazy-loading implementations (especially those that use JavaScript rather than the native loading="lazy" attribute) can hide images from the plugin’s scanner. If your plugin’s image sitemap is missing images you can see on the page, check whether your lazy-loading uses a non-standard approach.
3. JavaScript-rendered images need explicit inclusion
Single-page applications, React-based sites, and any site where image markup is added by JavaScript after page load present the same issue. The image is not in the initial HTML, so a plugin scanning the rendered HTML cannot find it. The fix is to provide the image URLs to your sitemap generator through a different source (a JSON data file, a content collection, an API endpoint) rather than relying on HTML scanning.
4. Subdomain images need separate verification
Images hosted on a subdomain (cdn.example.com, images.example.com) need that subdomain verified in Search Console for the engine to trust the image sitemap entries. If your main site is at example.com but your images live on cdn.example.com, add the CDN subdomain as a verified property in Search Console.
5. Missing alt text is not an image sitemap problem
Image sitemaps work alongside on-page image markup, not as a replacement for it. An image with a title and caption in the sitemap but no alt text on the page itself is still missing the most important accessibility signal. Fix the alt text at the page level; the sitemap metadata is supplementary.
How to submit and validate your image sitemap
If your image entries are inline within your standard URL sitemap (the most common pattern), you do not need to do anything different for submission. The standard sitemap submission you set up in Lesson 7 of Module 2: How to Submit Your Website Sitemap to Google Search Console and Lesson 8 of Module 2: How to Submit Your Website Sitemap to Bing Webmaster Tools already covers the image entries.
If you have a separate image-only sitemap (less common, but used by some larger sites), submit it as a second sitemap through the Sitemaps section of Search Console and Bing Webmaster Tools. The submission flow is identical to the standard sitemap submission.
How to Validate your Image sitemap
Validation involves three checks beyond the standard sitemap validation from Module 2.
- First, confirm the image namespace is declared in the opening urlset tag (
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"). Without this declaration, the engines treat the image elements as invalid XML. - Second, check that every
<image:loc>URL returns a 200 status code. Screaming Frog has a sitemap mode that checks image URLs the same way it checks page URLs. - Third, monitor the Sitemaps report in Search Console for any image-specific error messages. Google reports image-related issues alongside URL-related ones, including unreachable image URLs and namespace mismatches.
After a few weeks of indexing, Google Search Console’s Search Results report should show image search impressions and clicks for the images in your sitemap. That data is the practical validation that your image sitemap is working as intended.
Where this leaves us
You can now create an image sitemap that surfaces your images to Google, to Image Search specifically, and to the multimodal AI assistants that draw on Google’s image index. The implementation path depends on your stack, but the principle is the same regardless: declare each image, add the metadata where it helps, keep the image URLs accessible.
Video is next. Video sitemaps follow a similar pattern but with significantly more required and optional metadata, because videos have more dimensions to describe than images do (duration, content type, thumbnail, embed URL, and so on). The next lesson covers what video sitemaps look like, when they actually help, and how to create one without making the metadata overwhelming.
Up next: How to Create a Video Sitemap →
This is Module 3: Lesson 2 of The Sitemap Series, a Technical SEO series on sitemaps from first principles, built for the AI Search era.
The point about image sitemaps becoming more important for multimodal AI search is easy to overlook, especially since many site owners still treat them as an afterthought. I’ve also seen lazy-loaded and JavaScript-rendered images create indexing gaps, so it’s helpful that you highlighted those technical edge cases rather than focusing only on the XML structure itself.