Go behind the scenes of Google Search and listen to our SEO podcast, Search Off the Record.

Image sitemaps

Add images to an existing sitemap, or create a separate sitemap just for your images. Adding images to a sitemap helps Google discover images that we might not otherwise find (such as images your site reaches with JavaScript code).

Best practices

Example sitemap

The following example shows a sitemap entry for the page http://example.com/sample1.html, which contains two images, and an entry for http://example.com/sample2.html, which contains one image and all the optional metadata that can be provided in an image sitemap.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
      <image:caption>A funny picture of a cat eating cabbage</image:caption>
      <image:geo_location>Lyon, France</image:geo_location>
      <image:title>Cat vs Cabbage</image:title>

You can list up to 1,000 images for each page, using the syntax outline in the example above.

Image sitemap reference

XML namespace

The image tags are defined in the following namespace:


Image tag definitions

The following sitemap tags apply specifically to images. You must use the required tags; we recommend using the optional tags to provide more information and a better user experience.

Tag Required Description
<image:image> Yes Encloses all information about a single image. Each <url> tag can contain up to 1,000 <image:image> tags.
<image:loc> Yes The URL of the image.

In some cases, the image URL may not be on the same domain as your main site. This is fine, as long as both domains are verified in Search Console. If, for example, you use a content delivery network such as Google Sites to host your images, make sure that the hosting site is verified in Search Console. In addition, make sure that your robots.txt file doesn't disallow the crawling of any content you want indexed.

<image:caption> Optional A caption for the image.
<image:geo_location> Optional The geographic location of the image. For example, <image:geo_location>Limerick, Ireland</image:geo_location>.
<image:title> Optional The title of the image.
<image:license> Optional A URL to the license of the image. You can use image metadata instead, if you like.