Image Sitemaps
Google is remarkably good at finding text on your website. Images are a different story.
When Google crawls your pages, it picks up the text content efficiently. Images, especially those loaded through JavaScript, hosted on a CDN, or buried in a complex page structure, can be partially or entirely missed. If Google cannot find your images, they will not appear in Google Images. They will not contribute to your organic traffic. They will not help users discover your content.
An image sitemap fixes this. It is a direct signal to Google saying: here are the images on my site, here is where they live, and here is the page they belong to. This guide covers everything you need to know to set one up correctly, avoid the common mistakes, and get your images working properly in search.
Table of Contents
What Is an Image Sitemap?
An image sitemap is an XML file that tells search engines about the images on your website. It lists the URL of each image alongside the URL of the page it appears on, giving Google a structured map of your visual content.
You have two options for how to implement it. You can add image data directly into your existing XML sitemap by extending each page entry with image tags. Or you can create a completely separate, dedicated image sitemap file. Both approaches work equally well. For most sites, extending the existing sitemap is simpler. For image-heavy sites like e-commerce platforms, photography portfolios, or news publishers, a dedicated image sitemap keeps things more manageable.
Image sitemaps follow the same structure and size rules as regular XML sitemaps: maximum 50MB uncompressed and 50,000 URLs per file. If your site has more images than that, you break the sitemap into multiple files and link them together using a sitemap index file.
One important technical detail that many guides get wrong: Google allows up to 1,000 image entries per URL element. That means a single product page with multiple product images can reference all of them within one URL block.
Important: Google Deprecated Several Image Sitemap Tags
Before you build or update your image sitemap, you need to know this. Google deprecated the following image sitemap tags and they are no longer used by Google’s systems:
- image:caption
- image:title
- image:geo_location
- image:license
These tags were removed from Google’s official documentation. If your image sitemap currently includes them, they will not cause errors, but they do nothing. Google ignores them. Any guide or plugin still recommending these tags is out of date.
The only required tag for each image entry is image:loc, which is simply the URL of the image itself.
Here is what a correctly structured image sitemap looks like today:
xml
<?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://www.example.com/product-page/</loc>
<image:image>
<image:loc>https://www.example.com/images/red-running-shoes.jpg</image:loc>
</image:image>
<image:image>
<image:loc>https://www.example.com/images/red-running-shoes-side.jpg</image:loc>
</image:image>
</url>
<url>
<loc>https://www.example.com/blog/breakfast-ideas/</loc>
<image:image>
<image:loc>https://www.example.com/images/healthy-breakfast.jpg</image:loc>
</image:image>
</url>
</urlset>
Clean. Simple. Just the page URL and the image URL. That is all Google needs from the sitemap itself.
Why Your Site Needs an Image Sitemap
Not every site gains equally from an image sitemap. But for a broader set of sites than most people realize, it makes a meaningful difference.
Google Misses JavaScript-Loaded Images
This is the biggest practical reason to use one. If your site uses JavaScript frameworks, lazy loading, or dynamic content rendering to display images, Google can and does miss them during crawling. Its crawler prioritizes HTML-sourced content and may not render JavaScript at all on a first pass.
An image sitemap bypasses this problem entirely. You are not relying on Google to find the image during crawl. You are telling it directly where to look.
This is especially relevant for sites built on JavaScript-heavy frameworks, e-commerce platforms using dynamic product galleries, and any site using lazy loading for images below the fold.
CDN-Hosted Images Need Special Handling
Many sites host their images on a content delivery network (CDN) with a different domain from the main site. Google can index these images, but the CDN domain needs to be verified in Google Search Console separately.
If you host images on a CDN and have not verified that domain in Search Console, errors in crawling those images will go unreported to you. Image sitemaps support cross-domain image URLs, so you can list CDN-hosted images in a sitemap associated with your main domain. Just make sure both domains are verified.
Image-Heavy Sites Lose Traffic Without Proper Indexing
For e-commerce stores, photography sites, food blogs, and news publishers, images are not decoration. They are a primary discovery mechanism. People searching Google Images for a product, a recipe, a style, or a news event can land directly on your page.
If those images are not indexed, that traffic channel simply does not exist for you. An image sitemap ensures Google has every opportunity to find and index your visual content, giving you the best possible chance of appearing in image search results.
It Helps Google Understand Your Content Better
Even when Google can find your images without a sitemap, explicitly associating each image with its parent page through structured sitemap data gives Google stronger signals about what that page is about. This supports your overall technical SEO by reinforcing the topical relevance of your pages.
How to Create an Image Sitemap
Option 1: Extend Your Existing Sitemap
If you already have an XML sitemap, this is the easiest path. You add the image namespace declaration at the top of your urlset and then add image:image entries within each relevant URL block.
The namespace declaration you need at the top of your sitemap is:
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
Then for each page that contains images, you add one or more image:image blocks inside the URL entry.
Option 2: Create a Dedicated Image Sitemap
For sites with many pages and many images, a separate image sitemap keeps the main page sitemap clean and makes it easier to track image indexing separately in Search Console.
Create a new XML file following the structure shown in the example above, save it to your root directory (for example, https://www.example.com/image-sitemap.xml), and submit it separately.
Then reference it in a sitemap index file if you have multiple sitemaps, or add a reference line to your robots.txt:
Sitemap: https://www.example.com/image-sitemap.xml
Option 3: Use a WordPress Plugin
If your site runs on WordPress, plugins handle this automatically. Both Rank Math and Yoast SEO generate image sitemaps by default. They detect images on your pages, generate the correct XML structure, and update the sitemap automatically when you publish new content.
Check your plugin settings to confirm image sitemaps are enabled. In Yoast, this is under SEO > Features. In Rank Math, it is under Rank Math > Sitemap Settings.
For WordPress site owners looking to ensure their image sitemap is correctly configured as part of a properly structured site, our WordPress web design service includes sitemap setup and technical SEO configuration.
Submitting Your Image Sitemap to Google Search Console
Once your sitemap is ready and uploaded, you need to submit it so Google knows where to find it.
In Google Search Console:
Go to the Sitemaps section in the left menu. Enter the full URL of your image sitemap. Click Submit. Google will attempt to fetch and process the file. Within a few days, you will see status information showing how many image URLs were discovered and whether any errors were found.
If you have verified your main domain but use a CDN for image hosting, also verify the CDN domain in Search Console. This ensures any crawl errors on CDN-hosted images are reported to you.
Submit to Bing Webmaster Tools as well. The process is identical and takes two minutes. There is no reason to ignore Bing’s image indexing, particularly for e-commerce and local businesses.
Monitor the sitemap regularly in Search Console. Check for errors, dropped image counts, or crawl warnings. A sudden drop in indexed images is often a sign of a robots.txt issue or a URL structure change that broke image paths.
Image Sitemap Best Practices That Actually Matter
The sitemap is only part of the picture. What makes images actually rank in Google Images has as much to do with on-page optimization as with the sitemap itself.
Use Descriptive File Names
The file name is one of the first signals Google uses to understand what an image shows. “IMG_4872.jpg” tells Google nothing. “red-running-shoes-mens-collection.jpg” tells Google exactly what is in the photo and supports your keyword relevance.
Rename images before uploading them. This is especially important for product images, portfolio images, and any visual content you want to appear in image search results.
Write Accurate Alt Text for Every Image
Alt text is the single most important on-page image SEO signal. It tells Google what the image depicts, supports accessibility for screen readers, and directly influences which search queries your image can appear for.
Good alt text is specific and descriptive: “red running shoes with breathable mesh upper, mens collection” is better than “red shoes.” Avoid stuffing keywords into alt text. Write what the image actually shows, in natural language. If the image is purely decorative and adds no informational value, use an empty alt attribute (alt=””) rather than forcing a description.
Google confirmed it uses the surrounding page text to understand image context, not just the alt attribute. This means placing your images close to the text that describes them matters. A product image surrounded by relevant product copy is better understood by Google than the same image sitting in isolation.
Only Include Images Worth Indexing
Not every image on your site needs to be in your image sitemap or indexed by Google at all. Decorative images like background textures, dividers, icons, and UI elements add no value in image search results and consume crawl budget unnecessarily.
Focus your image sitemap on content images: product photos, blog post images, portfolio work, infographics, location photos, and any visual that a searcher might genuinely be looking for. This keeps your sitemap lean and signals to Google that you have carefully curated what you want indexed.
Use Supported Image Formats
Google supports JPEG, PNG, GIF, WebP, BMP, and SVG. Do not include TIFF or PSD files in your sitemap. WebP is the preferred format for general web use due to its superior compression, and Google fully supports it in image search.
For images served in next-gen formats, make sure you also provide a fallback format using srcset or the picture element. Google recommends always specifying a fallback URL in the src attribute so that crawlers that do not support modern format attributes can still access the image.
Compress Images Without Losing Quality
Page speed is a Core Web Vitals signal and directly affects rankings. Large, uncompressed images slow down your pages, which hurts both user experience and technical SEO performance.
Use tools like TinyPNG, Squoosh, or your CMS’s built-in optimization to compress images before they go live. Aim to serve images at the correct display dimensions rather than scaling down large images in HTML. A 3000px image displayed at 600px is wasting file size and page load time.
Check Robots.txt Is Not Blocking Your Images
This is one of the most common image indexing problems and the one most easily overlooked. If your robots.txt file blocks the /images/ directory or blocks the Googlebot from accessing certain file types, none of those images will be indexed regardless of what your sitemap says.
Check your robots.txt file at yourdomain.com/robots.txt. Look for any Disallow rules that might affect image directories or file types. If you find any blocking rules for images you want indexed, remove them and resubmit your sitemap.
Keep the Sitemap Updated
Your image sitemap should reflect the current state of your site. When you add new images, they should be added to the sitemap. When you delete or move images, the old URLs should be removed or updated.
An image sitemap full of broken image links tells Google you are not maintaining your site properly and wastes crawl budget on URLs that return 404 errors. Most CMS plugins handle this automatically, but if you are maintaining the sitemap manually, build updating it into your regular site maintenance routine.
Common Image Sitemap Errors and How to Fix Them
Error: Incorrect or Relative Image URLs
Google requires absolute URLs in image sitemaps. A relative URL like /images/photo.jpg will not work. The correct format is https://www.example.com/images/photo.jpg.
Fix: Replace all relative URLs with full absolute paths. Check your sitemap generation tool settings to ensure it outputs absolute URLs.
Error: Images Blocked by Robots.txt
If your robots.txt disallows access to the directory where your images are stored, Google cannot crawl those images. The image sitemap has no ability to override robots.txt restrictions.
Fix: Review your robots.txt file and remove any Disallow rules that apply to image directories or file types you want indexed. Test at yourdomain.com/robots.txt and use Google’s robots.txt tester in Search Console.
Error: Images on Noindex Pages
Search engines do not index images on pages that have a noindex directive. If you have marked a page as noindex because you do not want the page itself in search results, images on that page are also excluded.
Fix: If you need the images to be indexed, move them to indexable pages or reconsider the noindex directive. This situation commonly affects pages like thank-you pages, login-required pages, and certain product variation pages.
If you are experiencing broader indexing problems beyond images, our post on fixing the “Crawled – Currently Not Indexed” error in Google Search Console covers the diagnostic process in detail.
Error: Unsupported Image Formats
Including TIFF, PSD, or other unsupported formats in your sitemap causes processing errors. Google will skip those entries.
Fix: Convert images to supported formats before submitting. JPEG and WebP are the most reliable choices for photographic content. PNG is appropriate for graphics with transparency.
Error: Sitemap Exceeds Size or URL Limits
A single sitemap file cannot exceed 50MB uncompressed or 50,000 URL entries. For large sites, this limit is easy to hit.
Fix: Split your image sitemap into multiple smaller files and create a sitemap index file that references all of them. Submit the index file to Search Console.
Error: Broken Image Links or 404 Errors
If image URLs in your sitemap return 404 errors because images were deleted or moved, Google will report these as errors in Search Console and waste crawl budget attempting to access them.
Fix: Audit your sitemap regularly using a tool like Screaming Frog to identify broken image URLs. Update or remove them from the sitemap and either restore the missing images or implement proper 301 redirects if images were moved.
Error: Improper XML Formatting
A single unclosed tag or encoding error can make your entire sitemap unparseable. Google Search Console will report a parsing error and will not process any of the sitemap’s contents.
Fix: Validate your sitemap using Google’s Sitemap Tester in Search Console before submitting. Also run it through an XML validator to catch syntax issues. Make sure special characters in URLs are properly encoded.
Image Sitemaps as Part of a Broader SEO Strategy
An image sitemap is one tactical piece in a larger picture. It helps Google discover your images. But the images still need to be relevant, well-optimized, and on pages that Google has reason to trust and rank.
If your site has thin content pages hosting images without meaningful surrounding text, those images are unlikely to perform well in image search regardless of the sitemap. Google extracts context about images from the surrounding content, page title, headings, and caption text. A well-written, thorough page gives Google much richer signals about what each image depicts.
This connects directly to your broader content strategy. The same principles that make text content rankable also make images more discoverable. If you are thinking about how to build content that genuinely supports image SEO, our guides on the importance of content in SEO and how to write SEO-friendly blog posts cover how to structure and write the surrounding content that images need to perform.
For businesses in competitive local markets like Toronto, image search is often an underused traffic source. A local restaurant with beautiful food photos, a contractor with before-and-after project images, or a retailer with well-photographed products can generate meaningful local traffic through image search when those images are properly indexed. Our local SEO service covers visual optimization as part of a complete local search strategy.
Get Your Image SEO Set Up Correctly
If you are not sure whether your images are being indexed properly, or if you have an image sitemap but are not seeing your images appear in Google Images, a technical audit is the right starting point.
Our team at SEO24 regularly uncovers image indexing issues during site audits: robots.txt conflicts, broken image paths, missing alt text at scale, and incorrectly configured sitemaps. Start with a free SEO audit and we will flag any image-related issues alongside the broader technical picture. Or contact us directly to talk through your specific setup.
Frequently Asked Questions: Image Sitemaps
What is an image sitemap?
An image sitemap is an XML file that tells search engines about the images on your website. It lists the URL of each image alongside the URL of the page it appears on. This helps Google discover images that it might otherwise miss during regular crawling, particularly images loaded through JavaScript, images hosted on a CDN, or images embedded deep in a site’s page structure. You can create a dedicated image sitemap file or add image data to your existing XML sitemap.
Does Google require an image sitemap to index images?
No. Google can discover and index images through regular HTML crawling without a sitemap. However, images loaded via JavaScript, images on pages with complex structures, and images hosted on CDNs are commonly missed by crawlers that rely only on HTML analysis. An image sitemap gives you direct control over what image URLs Google has access to, which makes it particularly valuable for JavaScript-heavy sites and e-commerce platforms with large image libraries.
Which image sitemap tags does Google actually use?
As of the deprecation announcement in 2022, Google only uses the image:loc tag, which is the URL of the image. The tags image:caption, image:title, image:geo_location, and image:license have all been deprecated and are no longer processed by Google. Many guides and tools still include these tags, but they have no effect. Keep your image sitemap entries simple: page URL in the loc tag, image URL in the image:loc tag.
How do I submit an image sitemap to Google?
In Google Search Console, go to the Sitemaps section in the left navigation. Enter the full URL of your image sitemap (for example, https://www.example.com/image-sitemap.xml) and click Submit. Google will fetch and process the file and show you the number of image URLs discovered and any errors. You should also reference your sitemap URL in your robots.txt file so Google discovers it automatically: Sitemap: https://www.example.com/image-sitemap.xml
How many images can I include per URL in an image sitemap?
Google allows up to 1,000 image entries per URL element. This means a single page with many product images, gallery photos, or illustrations can reference all of them within a single URL block in your sitemap. There is no need to create separate URL entries for each image on a page.
Do WordPress plugins create image sitemaps automatically?
Yes. Both Yoast SEO and Rank Math generate image sitemaps automatically and keep them updated as you publish new content. In Yoast SEO, image sitemap functionality is enabled by default. In Rank Math, you can configure it under Rank Math > Sitemap Settings. These plugins detect images embedded on your pages and include them in the generated sitemap XML, which removes the need to maintain the file manually.
Will having an image sitemap guarantee my images appear in Google Images?
No. An image sitemap ensures Google has the opportunity to discover and crawl your images. It does not guarantee indexing or ranking in Google Images. Google still evaluates each image based on quality, relevance, page content, alt text, and many other factors before deciding whether to include it in search results. An image sitemap removes the discovery barrier, but the images still need to meet Google’s quality standards for image content.
Related Posts
Creating a successful SEO strategy for niche markets is a tailored process that differs significantly from broader industries. Niche markets often have smaller, more specific audiences with unique needs, which means SEO must be targeted and precise to connect with the right people. In this guide from SEO24, we’ll walk…
Struggling to stand out in Toronto’s competitive market? You’re not alone. Many small businesses are asking the same question: how to attract local customers in Toronto with SEO? The answer lies in mastering local search strategies that put your business in front of the right audience—exactly when they’re searching for…


