Technical SEO

Image Sitemap

Shahid Maqbool

By Shahid Maqbool
On Apr 26, 2023

Image Sitemap

What is an Image Sitemap?

An image sitemap is a special type of sitemap that contains information about the images on a website.

This is particularly useful for images that may not be easily found by Google's regular crawling process, such as images that are loaded using JavaScript code.

You have two options for creating an image sitemap: you can create a separate sitemap specifically for images, or you can add image-related information using special tags within your existing sitemap.

Both approaches are equally acceptable for Google to understand and index the images on your website.

Example of an image sitemap

Here is an example of what an image sitemap might look like in XML format for the website seodebate.com:

<?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.seodebate.com/page1.html</loc>

  <image:image>

    <image:loc>https://www.seodebate.com/images/image1.jpg</image:loc>

  </image:image>

</url>

<url>

  <loc>https://www.seodebate.com/page2.html</loc>

  <image:image>

    <image:loc>https://www.seodebate.com/images/image2.jpg</image:loc>

  </image:image>

</url>

<urlset>

In this example, each <url> element represents a URL on the website and contains information about the web page and associated images.

Inside each <url> element, there is <loc> element that specifies the URL of the web page.

Within each <url> element, there is an <image:image> element that contains information about an image associated with the web page.

It includes a child element such as <image:loc> which specifies the URL of the image.

The example provided includes two <url> elements, each representing a web page on the website "https://www.seodebate.com", and providing image information for two images, "https://www.seodebate.com/images/image1.jpg" and "https://www.seodebate.com/images/image2.jpg", along with their location.

Required tags for image sitemaps by Google

Here are the required tags for image sitemaps according to Google:

  • <image:image> - This tag identifies the location of the image and contains all the relevant information about the image. The <url> tag can have up to 1,000 <image:image> tags.

  • <image:loc> - This tag specifies the URL of the image on your website.

Google has deprecated the following tags, however, they may be used by other search engines to provide additional information about your images:

  • <image:title> - This tag specifies the title of the image.

  • <image:caption> - This tag specifies the caption of the image.

  • <image:license> - This tag specifies the license of the image.

  • <image:geo_location> - This tag specifies the geographic location of the image.

Why do you need an image sitemap?

An image sitemap can be beneficial for several reasons:

Improved visibility in search results

Including images in an image sitemap can help search engines discover and index them more easily, leading to improved visibility in search results.

This can help drive more traffic to your website and increase engagement with your content.

Better organization and categorization

An image sitemap can help organize your images into logical categories or groups, making it easier for search engines to understand the relationship between different images and the content on your website.

Improved performance

Including an image sitemap can help reduce the time it takes for search engines to discover and index your images, which can improve the overall performance of your website.

How to create an XML Image Sitemap

Here are three ways to create an XML Image Sitemap:

Manual creation of the sitemap

This method involves manually creating an XML Image Sitemap using a text editor or XML editor. Here are the steps:

  • Open a text editor or XML editor and create a new file.

  • Add the XML declaration at the beginning of the file:

    <?xml version="1.0" encoding="UTF-8"?>
  • Add the root element <urlset> with the namespace attribute:

    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">

Note: Including the "http://www.google.com/schemas/sitemap-image/1.1" namespace in an image sitemap is not necessary for all search engines, but it is specifically used for Google. Google supports this namespace as an extension to the standard sitemap protocol. However, if you are not targeting Google as your primary search engine or if you do not need to provide detailed image information, you may not need to include this specific namespace in your image sitemap.

  • For each image, add <url> element with <loc> element that specifies the URL of the image, and an <image:image> element that contains the image details, including the <image:loc>, <image:title>, and <image:caption> tags. Remember, the last two tags are not required for Google.

  • Save the file as an XML file with a .xml extension, host it on your root folder and submit it to search engines through their webmaster tools.

Automated generation of the sitemap

This method involves using an online tool to automatically generate an XML Image Sitemap. Here are the steps:

Automated generation of the sitemap 1
  • Enter the URL of your website and select the option “Image Sitemap” and click on “Start”.

  • The tool will crawl your website and generate an XML Image Sitemap based on the images it finds.

Automated generation of the sitemap 2
  • Download the generated sitemap file and submit it to search engines through their webmaster tools.

Automated generation of the sitemap 3

Netpeak Spider

This method involves using a website crawler tool to generate an XML Image Sitemap. Here are the steps:

  • Download and install Netpeak Spider on your desktop.

  • Launch the tool and enter the URL of your website.

  • Configure the tool to include images in the crawl.

  • Netpeak Spider will crawl your website and generate an XML Image Sitemap based on the images it finds.

  • Save the generated sitemap file and submit it to search engines through their webmaster tools.

Creating an XML Image Sitemap manually, using an online tool, or using a website crawler tool are all valid options.

Regardless of the method you choose, it is important to ensure that your XML Image Sitemap includes all the required tags and accurately represents the images on your website.

Image sitemap best practices

Google recommends following general sitemap best practices for image sitemaps too.

These best practices typically include ensuring that the sitemap is correctly formatted, contains accurate and up-to-date information, and is accessible by search engines.

In addition to general sitemap best practices, it is also recommended by Google to follow best practices for publishing images on your website. This may include using:

  • descriptive file names and alt tags for your images

  • optimizing image file sizes for faster loading times

  • providing relevant and high-quality images

  • adhering to any copyright or licensing requirements for using images on your website

By following both general sitemap best practices and best practices for publishing images, you can help ensure that your image sitemap is effective in providing accurate and relevant information to search engines, which can potentially improve the visibility and indexing of your images in search results.

Do all sites need a sitemap for images?

Not all sites need a sitemap for images, but it can be beneficial for sites with a large number of images or for sites where images play an important role in the content.

If your site has only a few images or if the images are already well-organized and easily discoverable by search engines, then a sitemap may not be necessary.

However, if your site has a large number of images, or if the images are embedded in JavaScript or other code that may make them harder for search engines to find, then an image sitemap can help improve the indexing and visibility of your images in search results. 

Furthermore, an image sitemap is particularly useful for e-commerce sites or sites that rely heavily on images to showcase products or services.

In such cases, an image sitemap can help ensure that search engines can easily find and index all the relevant product images, which can lead to increased visibility and sales.

Takeaway

Including an image sitemap as part of your website's SEO strategy may enhance your website's visibility and organization of images, leading to potential benefits in search engine rankings and user experience.

Be sure to follow Google's guidelines for creating image sitemaps and include all the required and optional tags for accurate indexing of your images.

Regularly update and submit your image sitemap to ensure it stays current with changes to your website's image content.

Related Articles

Leave a reply
All Replies (0)