Image Sitemap

An image sitemap is an XML sitemap, or an extension of one, that lists the images used on each page. It helps search engines discover images they might otherwise miss, such as those loaded by JavaScript, so they can appear in image search.

How it works

Image entries are usually added to an existing XML sitemap using Google’s image namespace. Under each page URL, you add one or more <image:image> blocks, each containing an <image:loc> with the image’s URL. A page can list up to 1,000 images.

You can also create a separate sitemap just for images and list it in a sitemap index.

Google used to support extra tags such as caption, title, geo location and licence. These were deprecated, so the image location is now the only one that matters. Context comes from the page itself instead.

When it helps

  • Images loaded through JavaScript, sliders or galleries that crawlers may not find in the HTML.
  • Sites where images drive traffic, such as ecommerce, recipes, property, travel and photography.
  • Images hosted on a CDN or separate domain. Google allows image URLs on other domains in an image sitemap.
  • Large sites where new images are added frequently.

If your images are standard <img> elements with a src attribute in the HTML, Google can usually find them without an image sitemap. It is a helpful extra, not a requirement.

How to create one

  1. Check whether your CMS or SEO plugin already adds images to sitemaps.
  2. Add the image namespace declaration to the sitemap’s urlset element.
  3. Under each page entry, list the important images that appear on that page.
  4. Use absolute, crawlable image URLs that are not blocked in robots.txt.
  5. Submit the sitemap in Search Console and monitor it for errors.

What still matters more

An image sitemap only helps discovery. Ranking in Google Images depends on the page and image itself:

  • Descriptive alt text and relevant surrounding text.
  • Clear image file names.
  • Good quality images that are properly compressed and sized.
  • Placement near relevant headings and content.

Fast-loading images also matter. If you use lazy loading, make sure the real image URL is in the HTML or loads without needing a scroll or click, otherwise search engines may only see a placeholder. An image sitemap can act as a safety net here, but it should not be the only way an image is discoverable.

Common mistakes

  • Listing decorative images, icons and logos instead of meaningful content images.
  • Including image URLs that return errors or redirects.
  • Relying on deprecated caption and title tags for context.
  • Blocking image folders in robots.txt, which stops Google fetching the files even when they are listed.
  • Letting the sitemap fall out of sync when images are renamed, moved or deleted.

A quick check in Search Console’s sitemap report, plus a crawl that compares listed image URLs with their status codes, will catch most of these problems.

Further reading: Google’s image sitemap documentation.

Key Takeaways

  • An image sitemap lists the images used on each page of a site.
  • It is most useful when images are loaded by JavaScript or added frequently.
  • Only the image location tag is still used by Google.
  • Images hosted on a CDN or other domain can be included.
  • Alt text, file names and page context still drive image rankings.

Related Terms

Need a second opinion on your website? Ask for a free website SEO check, or keep learning in the SEO Encyclopedia.