Skip to main content

How to add images to sitemaps

Sitemaps are an invaluable resource for search engines, and an important part of a website. They allow search engines to discover contents on a site that would otherwise be impossible to locate, hidden among hundreds and thousands of pages. Along with text content another important element of the web most webmasters ignore are images.

The Google Webmaster blog teaches us how to add images to a sitemap thereby helping crawlers discover them as well. This is particularly true for images that are only accessible via JavaScript forms, or for pages that contain many images but only some of which are integral to the page content.

In the following example, a Sitemap entry for the URL http://example.com/sample.html is shown which contains two 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>

You can add up to 1000 images for each page.

The following table describes the different tags used in the sitemap code.

Tag Required Description
<image:image> Yes Encloses all information about a single image. Each URL (<loc> tag) can include up to 1,000 <image:image> tags.
<image:loc> Yes The URL of the image.
<image:caption> Optional The caption of 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.

Comments

  1. Yes, Google collects info about images from alt and title tags.

    ReplyDelete

Post a Comment

Popular posts from this blog

How to Record CPU and Memory Usage Over Time in Windows?

Whenever the computer is lagging or some application is taking too long to respond, we usually fire up task manager and look under the Performance tab or under Processes to check on processor utilization or the amount of free memory available. The task manager is ideal for real-time analysis of CPU and memory utilization. It even displays a short history of CPU utilization in the form of a graph. You get a small time-window, about 30 seconds or so, depending on how large the viewing area is.

How to Schedule Changes to Your Facebook Page Cover Photo

Facebook’s current layout, the so called Timeline, features a prominent, large cover photo that some people are using in a lot of different creative ways. Timeline is also available for Facebook Pages that people can use to promote their website or business or event. Although you can change the cover photo as often as you like, it’s meant to be static – something which you design and leave it for at least a few weeks or months like a redesigned website. However, there are times when you may want to change the cover photo frequently and periodically to match event dates or some special promotion that you are running or plan to run. So, here is how you can do that.

Diagram 101: Different Types of Diagrams and When To Use Them

Diagrams are a great way to visualize information and convey meaning. The problem is that there’s too many different types of diagrams, so it can be hard to know which ones you should use in any given situation. To help you out, we’ve created this diagram that lays out the 7 most common types of diagrams and when they’re best used: