Image sitemap

On this page 6

An image sitemap is an XML sitemap, or an extension of one, that lists the image files associated with each page of a website so that search engine crawlers can discover images they might otherwise miss. In crawling and SEO, it supplements normal link discovery and is most valuable for images loaded by JavaScript, served from a content delivery network or central to the business, such as product photos or a photography portfolio.

The format is defined by the Google image sitemap extension, which adds an image:image element with a required image:loc child inside each url entry of a standard sitemap.

How an image sitemap works

An image sitemap tells the crawler which images belong to which page. Each url entry names the page in loc, and one or more image:image blocks name the image files that appear on it. Because the relationship to the page is explicit, Googlebot can index the image with the context of the hosting page, which is what Google Images actually ranks.

The file declares the image namespace in the root urlset element, follows the usual UTF-8 and entity-escaping rules of XML and is submitted through Search Console or referenced with a Sitemap line in robots.txt. Image entries can live in a dedicated file or be added to an existing XML sitemap; search engines treat both approaches the same.

The following table lists the elements and the limits that apply to them.

Element or limitStatusNotes
image:imageRequired wrapperOne block per image on the page
image:locRequiredAbsolute URL of the image file
image:caption, image:titleDeprecated since 2022Ignored by Google; harmless if left
image:geo_location, image:licenseDeprecated since 2022Use on-page data or metadata instead
Images per page entryUp to 1,000Additional images are not processed
File size50,000 URLs or 50 MB uncompressedSplit larger sets with a sitemap index
Elements and limits of an image sitemap

When an image sitemap adds value

An image sitemap helps most when standard crawling cannot see the images. Images referenced in an img element with a plain src attribute are usually found without help, so many small sites gain little. The benefit grows with the size of the image library and with the use of lazy loading, carousels or client-side rendering.

SituationBenefitReason
JavaScript galleriesHighImages may load only after interaction
Images on a CDN domainHighLinks the external file to the page
Large ecommerce catalogsHighSpeeds discovery of new product photos
Photography or stock portfoliosHighImages are the primary content
Small blog with standard markupLowCrawler already finds the images
Situations in which an image sitemap is worth adding

Images hosted on another domain may be listed, which is common with CDNs, but the image host must allow crawling in its own robots.txt. A sitemap cannot override a disallow rule, and blocked images remain unindexed regardless of how they are listed.

Image sitemaps belong to a family of media-specific sitemap extensions that share the XML sitemap structure but answer different discovery problems. Choosing the right one depends on the content type rather than on the page type.

Sitemap typeMain purposeKey requirement
XML sitemapLists canonical page URLsIndexable, canonical URLs only
Image sitemapLists images per pageImage URL in image:loc
Video sitemapDescribes video contentThumbnail, title and description
News sitemapSurfaces recent articlesArticles from the last two days
HTML sitemapHelps human navigationReadable list of links
Comparison with other sitemap types

A sitemap index can group image sitemaps with all the others, which keeps large sites organized and lets teams update media files on a different schedule from page files.

Image sitemaps also differ from structured data. Schema markup such as Product or Recipe can reference images and make them eligible for rich results, while the sitemap only supports discovery and page association. Large sites often use both: structured data describes what an image shows in context, and the sitemap ensures that the crawler reaches every relevant file in the first place. Neither replaces a crawlable page that displays the image to visitors.

Implementation practice and common mistakes

Good implementations are generated automatically by the content management system or ecommerce platform, so that new and removed images are reflected without manual work. Each listed image should return HTTP status 200, use a supported format such as JPEG, PNG, WebP, GIF, SVG or AVIF and appear on the listed page.

  • Listing images not shown on the page: the page context is missing, so indexing value is weak.
  • Blocking image paths in robots.txt: listed files cannot be crawled at all.
  • Relying on deprecated tags: captions and titles belong in alt text and visible copy.
  • Listing redirected or broken files: wastes crawl budget and reduces trust in the sitemap.
  • Expecting a ranking boost: the sitemap improves discovery, not relevance.

An image sitemap is a discovery aid, not a ranking factor. Ranking in image search still depends on descriptive alt text, relevant surrounding text, file names, image quality and the authority of the hosting page. Support also varies by search engine, so Search Console reports remain the most direct way to confirm that images are discovered and indexed.

Understanding it simply

An image sitemap is a list of pictures with their addresses that a website hands to search engines. Picture a museum giving a visiting critic a printed guide to every painting and the room it hangs in, so nothing in a back corridor is overlooked.

Search engines can usually find pictures on their own. The list helps when pictures are hidden behind buttons, sliders or other servers. It does not make a picture rank higher; it just makes sure the search engine knows the picture exists.

Applied in practice

An online furniture retailer sells about 12,000 products, each with six to ten photos in a JavaScript carousel served from a CDN subdomain. Search Console shows that only the first photo of most products appears in Google Images, because the other photos load only after a shopper clicks the arrows.

The development team adds image entries to the product sitemaps, generated nightly from the catalog database, and splits them into files of 10,000 product URLs referenced by a sitemap index. They confirm that the CDN robots.txt allows crawling. Within about six weeks, the number of indexed product images roughly quadruples, and image search starts sending visits to angle and detail shots that had never been discovered before.