A photo album

Gary John Norman / Image Source RF

You have a great site, full of outstanding photography. You want to show it to everyone. But the ‘person’ who needs to see it first is Google, and Google needs a map. This week, Alex Jordan’s essential guide to optimising your images for search engines, shows you how to build an Image Sitemap

This session is part of my image optimisation series. For more information about the series please see my introduction.

XML Sitemaps are arguably the best way of telling Google and other search engines that specific pages in your website exist. This tutorial is specifically about Google image Sitemaps, but first, you must have a reasonable understanding of what standard XML Sitemaps are and how to use them.

Standard XML Sitemaps

Sitemaps are essentially lists of URLs that relate to each page on a website, like an index or directory. Submitting Sitemaps to search engines allows them to ‘discover’ every page on your site. What makes XML Sitemaps special is the way that they are formatted. They allow you to provide additional information, such as the last modification date of a given page, but more importantly all major search engines support XML Sitemaps.

For the sake of this tutorial I am going to assume that you know about XML Sitemaps. If you do not then I recommend you first check out www.sitemaps.org and read through Google’s Documentation.

Google Image Sitemaps

Google Image Sitemaps extend the standard Sitemap protocol and allow webmasters to provide extra information about their images. They are a great way to directly tell Google where your images are (on your server) and what they are about. Using image Sitemaps therefore improves communication with Google which reduces the time that it takes for Google to index your sites and enhances the potential for your images to rank for relevant searches.

Assuming you already have a standard XML Sitemap set up, you must first add the following XMLNS declaration to the <urlset> tag:


This declaration allows the additional image-related information to be interpreted because it is not part of the standard Sitemap protocol.

In order to turn your standard Sitemap into an image Sitemap you must then add the following tags which go between the <url> and </url> tags: <image:image> which encloses all information about a single image, and <image:loc> which specifies the URL of the image.

For example:







There are then four optional tags that can be used to provide extra information:

  • <image:caption> allows you to define a caption (description) of an image.
  • <image:geo_location> allows you to describe the geographical location of where an image was taken, for example “Soho, London, England”.
  • <image:title> allows you to define a title (shorter than a caption) for an image
  • <image:license> allows you to place a URL to the license of an image

A complete example of an Image Sitemap for a site (www.example.com) with 1 page and 1 image could therefore be:

<?xml version=”1.0″ encoding=”UTF-8″?>

<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″






<image:caption>Fat Jack Russell Chewing a Bone in Soho Square on October 22nd 2012</image:caption>

<image:geo_location>Soho Square, Soho, London</image:geo_location>

<image:title>Jack Russell Chewing Bone</image:title>





Note: Please ensure that your robots.txt file does not disallow the crawling of any content you want indexed.

For more information about image Sitemaps please see Google’s documentation.

If you have any questions feel free to comment or get in touch at @AlexJordanUK. Check back next week for my final tutorial where I shall discuss Social Media and Copyright.


Your download will start shortly, please do not navigate away from this page until the download prompt has appeared. Doing so may cause your download to be interrupted.