E-commerce

Image SEO: How Google Finds the Pictures on Your Site

A clothing rack beside a laptop showing a product photo, with a short handwritten filename on a card next to the keyboard

Image SEO is how the pictures on a product page become something Google can crawl, not just something a shopper sees in the browser. Google says it can index images that are in an HTML img tag. Images placed only as a CSS background are not indexed that way [1]. If the hero of a product is a background image, search never gets a file to rank.

Which image formats can be indexed?

Google's image guidance lists BMP, GIF, JPEG, PNG, WebP, SVG, and AVIF [1]. A modern format is fine. The format is not a substitute for a real img element with a URL that stays the same.

What happens with srcset and picture?

A responsive image still needs a fallback. Google says an img that uses srcset also needs a src, and a picture element needs an img inside it so there is something to index when the fancy source is skipped [1]. A page that only offers a source tag and no img gives the crawler nothing solid.

Do filenames matter?

Yes, as a description, not as a keyword pile. Google recommends descriptive filenames [1]. "navy-linen-shirt.jpg" tells a system what the file is. "IMG_4481.jpg" and "best-shirt-buy-now-cheap.jpg" do not. Keep the same URL for the same photo. Google says to use a consistent URL for an image rather than letting it change [1].

What should alt text say?

Google calls alt text the most important metadata for an image, and it warns that stuffing keywords into it is a bad experience that can look like spam [1]. WAI makes the access point: equivalent alt text is what a screen reader speaks, and it is also what technologies that cannot see the picture, including search engines, get instead [2]. Write the sentence you would say to a customer who cannot see the photo. One sentence. The color, the product, the view. The U.S. Department of Justice lists images with no text alternative as one of the barriers that keep people out of a public business site [6].

Which image should represent the page?

Google says you can point at a preferred image with primaryImageOfPage or og:image, and you should avoid using the logo or an image with an extreme aspect ratio as that representative image [1]. The logo is for the brand mark. The product photo is the one that should stand for the page.

Does an image sitemap guarantee the photos get crawled?

No. A sitemap helps discovery. Google's sitemap overview says a sitemap does not guarantee that every URL in it will be crawled or indexed, and it is useful when you have rich media such as images [3]. An image sitemap can list image files on another domain or a CDN [1]. It is a map. It is not a promise that the photo will rank.

What if the image file itself is an error?

A picture that returns an error is not a picture Google can keep. Google's HTTP status guide says a 4xx response, other than 429, means the content is ignored, and indexed URLs that start returning those errors are removed over time [4]. A product image that 404s is an empty slot. Fix the file. Do not leave a broken src and hope the stylesheet background covers it, because that background is not the indexed image [1].

Can robots.txt hide the photos by accident?

A disallow stops Google from fetching that URL. It does not reliably keep an already linked page out of results, and a blocked page can still appear without a snippet [5]. For images, the practical mistake is blocking the folder that holds the product files, or blocking the CSS and JavaScript the page needs to show them. Google's robots.txt introduction says not to block resources the page needs [5]. If the crawler cannot fetch the image, it cannot index the image.

  • Use an img tag — with a src, even when srcset or picture is doing the responsive work.
  • Name the file — after the product, and keep that URL stable.
  • Write alt text — as a description, not a keyword list.
  • Do not block the folder — in robots.txt if you want the files fetched.
  • Treat a sitemap as a hint — not as a guarantee the photo will be indexed.

Where does this sit next to the rest of the store?

Markup does not replace the photographs. Which photos a small site needs is the shot list. This page is how those files get seen. A store that looks finished and still does not sell is often a store build problem sitting next to a photo problem, which is the territory in why an online store loses sales. Fashion brands have a tighter version of the same photo job in features that convert on a fashion store.

What should you check on one product page this week?

View the source, or the elements panel, and find the product image. If it is only a background-image in CSS, Google's own rule says that file is not the indexed image [1]. If the img has no alt, or the alt is a string of search phrases, rewrite it as one plain sentence [1]. Then open the image URL itself. If it 404s, the page is showing a hole [4]. That is the whole image SEO pass for one product.

Sources & references

  1. Google Search Central: Google image SEO best practices.
  2. W3C WAI: Introduction to Web Accessibility.
  3. Google Search Central: Learn about sitemaps.
  4. Google Search Central: HTTP status codes and network errors.
  5. Google Search Central: Introduction to robots.txt.
  6. U.S. Department of Justice: Guidance on Web Accessibility and the ADA (18 March 2022).

Google's crawl and image rules are updated on the linked pages. Read the current page before you change a live store.

If the product photos are on the site but not showing up where buyers look, we can check how they are marked up.

Talk to us arrow_right_alt