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
- Follow best practices for publishing images and the Webmaster Guidelines.
- You can add image metadata, such as contact information and licensing information, which will appear in image search results.
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.
<?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>http://example.com/sample1.html</loc> <image:image> <image:loc>http://example.com/image.jpg</image:loc> </image:image> <image:image> <image:loc>http://example.com/photo.jpg</image:loc> </image:image> </url> <url> <loc>http://example.com/sample2.html</loc> <image:image> <image:loc>http://example.com/picture.jpg</image:loc> </image:image> </url> </urlset>
You can list up to 1,000 images for each page, using the syntax outline in the example.
Image sitemap reference
XML namespace
The image tags are defined in the following namespace:
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
Image tag definitions
To make sure Google can discover your image sitemap, you must use the following required tags:
Required tags | |
---|---|
<image:image> |
Encloses all information about a single image. Each <url> tag can
contain up to 1,000 <image:image> tags.
|
<image:loc> |
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. |
Deprecated tags and attributes
We removed the following tags and attributes from our documentation:
<image:caption>
, <image:geo_location>
,
<image:title>
, <image:license>
. See the
deprecation announcement
for more information.