Join mailing list
How to add an image sitemap to your website for Google
By
16 May 2018 (Edited 13 June 2018)

Share This Article


Source: David|16 May 2018


Google believes that having lots of relevant images on a website contributes to a great user experience. Unfortunately, it's not always easy for Google to find website images, especially if they're behind JavaScript. Fortunately, creating an XML image sitemap is an effective way of helping Google find all the images on your website.

I'm going to show you how to do that. But before I do, a couple of warnings

  1. To use your sitemap, you'll need FTP access to the root of your Web server (where the index file is).
  2. In order to be able to register your sitemap with Google, you'll need to own your site in Google Search Console. That's accomplished by logging in to your Google account, going to Search Console, and adding a META tag to your home page, or uploading a file to your root directory.,

If this sounds like a lot of trouble, and if you're wondering "what's in this for me?": Google is now using quantity and quality of relevant, optimized images as a factor in ranking websites in organic search. Hence, Backlinko.com's 2018 Google Ranking Factor #29: "Image Optimization: Images send search engines important relevancy signals through their file name, alt text, title, description and caption." Don't let suboptimal management of images limit your positioning in Google search returns.

Google has helpfully published a detailed discussion of Image Publishing Guidelines for creating a great user experience. (See Related Websites, below, for this and other links.) Here are some of Google's tips for image optimization:

  • Display images only where they add value to the page. And "We particularly discourage pages where neither the images or the text are original content." [Like stock photos]
  • Place images near relevant text.
  • Place most important image near top of page.
  • Don't embed important text in images.
  • Provide logical titles, captions, filenames and ALT text for images. Don't keyword-stuff ALT text.
  • Have good content - Google may use it to generate a text snippet for an image.
  • Design for mobile first because people search on Google Images more from mobile devices. Use Google's Mobile Friendly Testing Tool.
  • Create logical URL structure in paths to images.
  • Optimize images for speed.
  • Use sharp photos.
  • Use an image sitemap."You can give Google additional details about your images, and provide the URL of images we might not otherwise discover by adding information to an image sitemap."

Over at Search Console Help (link below) Google provides an example of a simple XML image sitemap for a single website page with 2 images:

     <?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/sample.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> </urlset> 

These lines of code at the top

     <?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> 

and these at the bottom

     </url>  </urlset> 

are boilerplate; every XML image sitemap needs these lines of code.

This line of code defines the URL(s) where the images are located:

<loc.http://example.com/sample.html</loc>

And the code for each individual image looks like this:

<image:image>
<image:loc>http://example.com/somefilename.jpg</image:loc>
</image:image>

Knowing that syntax, you could now hand-code an entire XML image sitemap for your website. But that would be exceedingly tedious.

Happily, there's another way. UK developers Angel Digital have created a free online Image Sitemap Generator, here: http://angeldigital.marketing/image-sitemap/

To use it, all you have to do is enter the URL of the website or directory you want sitemapped, and push the go button.

For purposes of example, I've run the Angel Digital tool on my site DavidHBoggs.com where the top part of the index page looks like this:

And the upper part of the resultant XML sitemap created by the Sitemap Generator looks like this:

<?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://www.davidhboggs.com/</loc>
<image:image>
<image:loc>http://www.davidhboggs.com/images/feed-icon-20x20.png</image:loc>
</image:image>
<image:image>
<image:loc>http://www.davidhboggs.com/images/david_round_150.jpg</image:loc>
</image:image>
<image:image>
<image:loc>http://www.davidhboggs.com/images/newsletter.png</image:loc>
</image:image>
<image:image>
<image:loc>http://www.davidhboggs.com/images/adwords2.png</image:loc>
</image:image>
<image:image>

Much more follows. But from this snippet of its output you can see the tool has done its job. In the order presented above, the images it's indexed are:

  • feed-icon-20x20.png - RSS icon at "Subscribe to my blog"
  • david_round_150.jpg - head shot at top left
  • newsletter.png - envelope icon at top right
  • adwords2.png - link to AdWords certificate

This tool is slick, especially considering that it's free. The only caveats from the developers are (1) crawl is limited to 1000 pages - but we've successfully crawled sites one directory at a time to make sitemaps for sites larger than that; and (2) sorry, no support.

Once you have your sitemap, just FTP it up to your server root directory, then go to Google Search Console and submit the sitemap. Google will do a quick test of the sitemap, and if it works, you're golden.


If you found this article helpful and would like to see more like it, please share it via the Share This Article link at the top of the page.

And if you have questions or comments, you can easily send them to me with the Quick Reply form, below.


David Boggs    - David
View David Boggs's profile on LinkedIn

AdWords Search Certification - David H Boggs

Rating
4/5 based on 1 votes.
Tags , , ,
Related Websites
Views 203 views. Averaging 1 view per day.
Related Listings
Similar Listings
External Article: 


E-mail:
Quick Reply
Name:
E-mail:
Subscribe to my newsletter:
Your Comment:


You may use BB Codes in your message.
Spam Prevention:


Members currently reading this thread:

Previous Article | Next Article