Skip to content

Image alt text: how to write it for your product photos (SEO and accessibility)

By the SEOXtreme editorial teamUpdated 6 min read

Picture a customer who shops with a screen reader. She lands on the product page for a pair of earrings and hears: "image, IMG underscore 4587 dot jpg." Nothing about the color, the material, or the size. She closes the tab and buys from another store. That's what happens when the image alt text on your photos is empty or poorly written.

The same oversight costs you in Google: if your photos don't explain what they show, you compete blind in image search and give the search engine less context about your products. In this guide you'll see what the alt is for, a formula for writing it on product pages, good and bad examples, when to leave it empty, and how to optimize your images beyond the text.

In short:

  • Alt text exists first for people who can't see the image; if it serves them, it serves Google too.
  • Describe what sets each photo apart: product, color, angle, detail, or use.
  • Decorative images get an empty alt; images that are links describe where they lead.
  • Optimizing images for SEO also includes file name, format, file size, dimensions, and lazy loading.
  • AI speeds up the work in large catalogs, but every text needs review.

Image alt text meaning: what it is and who you write it for

Alt text is the content of an image's alt attribute. It has three jobs: screen readers read it aloud, it appears in place of the image when the image doesn't load, and it helps search engines understand what the image shows. In image alt text HTML, it looks like this:

<img src="sterling-silver-hoop-earrings-20mm.jpg"
     alt="925 sterling silver hoop earrings, 20 mm, front view">

Accessibility comes first, and it isn't a favor: it's the difference between someone being able to buy from you or not. The good news is that the text that best describes the photo for a person is usually also the one that best explains it to a search engine.

Alt text and SEO: what Google says

Google's image SEO best practices guide calls alt text the most important attribute for providing additional information about an image, and explains that Google combines it with computer vision algorithms and the page's content. It asks for useful, information-rich text, with keywords used appropriately and no stuffing.

This example, adapted from the one Google uses in that guide, shows the progression:

<!-- Bad: no alt text -->
<img src="mug.jpg">

<!-- Bad: keyword stuffing -->
<img src="mug.jpg" alt="mug mugs coffee mug cheap mug wholesale mugs gift mug">

<!-- Better -->
<img src="mug.jpg" alt="Mug">

<!-- Ideal -->
<img src="blue-ceramic-mug-12oz.jpg" alt="Cobalt blue 12 oz ceramic mug with a round handle">

How to write alt text for product images: a simple formula

This structure works for product pages:

What the product is + what sets this photo apart (color, angle, detail, or use) + context, only if it adds something.

A few image alt text best practices that make it work:

  1. Start with what it is. The product's real name, the way a customer would search for it.
  2. Describe what you see in that photo, not in all of them. The front view, the clasp, and the photo of the item being worn are three different images.
  3. Don't start with "image of" or "photo of." The screen reader already announces that it's an image.
  4. Include the detail that helps people decide: color, material, size, or the exact variant.
  5. Be brief. One sentence is enough; if the image contains complex information, also publish it as text on the page.

Image alt text examples: good, bad, and fixable

Image Weak alt Useful alt
Main photo of a pair of earrings "earrings" "925 sterling silver hoop earrings, 20 mm, front view"
Detail of the clasp "silver earrings" (repeated) "Hinged clasp of the sterling silver hoop earrings"
Photo of the item being worn "model" "Sterling silver hoop earrings being worn, side view"
Color variant "earrings" "Rose gold plated hoop earrings, 20 mm"
Size chart as an image "chart" "Ring size chart," and the chart also published as text
Logo linking to the homepage "logo" "Your Store, go to homepage" (with your brand name)
Shipping icon next to the text "Free shipping" "free shipping truck" Empty alt: the text is already next to it
Banner with the text "Seasonal sale" "banner" "Seasonal sale on silver jewelry"

If you want to apply this logic to the rest of the product page, the product page SEO guide covers the title, description, reviews, and structured data.

When to leave the alt empty (and when not to)

The W3C's alt decision tree helps you settle doubtful cases:

  • Decorative (dividers, backgrounds, ornaments): empty alt, alt="". Don't omit the attribute: if it's missing, some screen readers read the file name.
  • Repeats text that's already next to it: empty alt, so you don't say the same thing twice.
  • It's a link or a button: the alt describes the destination or the action, not the drawing.
  • It contains text that doesn't appear anywhere else: the alt includes that text.
  • It's informative (like a product photo): a brief description of what it contributes.

This is what the two cases stores most often get wrong look like:

<!-- Decorative: empty alt, the screen reader ignores it -->
<img src="floral-divider.svg" alt="">

<!-- Logo linking to the homepage: the alt describes the destination -->
<a href="/"><img src="logo-yourstore.svg" alt="Your Store, go to homepage"></a>

Where to write it in WordPress, WooCommerce, and Shopify

In WordPress and WooCommerce, open the Media Library, select the image, and fill in the "Alternative Text" field. You can do it when uploading photos from the product page, both for the main image and for each gallery image. One detail that confuses people: in blog posts, the block editor saves the alt inside the post when you insert the image, so if you later change it in the Media Library, check the post too.

In Shopify, each product image has its own alt text field in the admin.

In large WooCommerce catalogs, filling in thousands of alts by hand isn't realistic. SEOXtreme generates alt text with computer vision anchored to the product's name and leaves it in an approval queue with a before/after view, so you review it before it's published. You can see it in WooCommerce SEO.

Optimizing images for SEO beyond the alt

  1. Descriptive file name. Google puts it this way: my-new-black-kitten.jpg is better than IMG00023.JPG. In your store: sterling-silver-hoop-earrings-20mm.jpg.
  2. The right format. Google supports BMP, GIF, JPEG, PNG, WebP, SVG, and AVIF. WebP and AVIF are usually lighter at similar quality.
  3. Right file size and dimensions. Export the image at the size it's displayed and compress it. With srcset or <picture>, each screen gets the right version.
  4. Declared width and height. The width and height attributes reserve the space and prevent layout shifts.
  5. Lazy loading, with judgment. Use loading="lazy" on images below the first screen. web.dev's lazy loading guide warns against applying it to images that are visible on load, especially the main one. We explain it in Core Web Vitals.
  6. Placement with context. Google recommends placing images near relevant text and on pages related to what they show.
  7. The image in structured data. Include the product photos in your Product schema.

If your images are the reason your store loads slowly, also check slow WooCommerce.

Common image alt text mistakes

  • The file name as the alt: "IMG_4587" tells nobody anything.
  • The same alt on every photo in the gallery. You miss the chance to describe details, angles, and variants.
  • Keyword stuffing. It's exactly what Google uses as a bad example.
  • Important information only inside an image. Prices, sizes, or terms in a banner with no equivalent text.
  • Describing decorative icons. They fill the screen reader experience with noise.
  • Publishing AI-generated alts without reviewing them. A "blue" that's actually green is false information. Apply the same standard as with your product descriptions.

Conclusion: describe what you see, for those who can't see it

The best alt text is the one that would let someone buy without seeing the photo: it says what it is, what sets it apart, and nothing more. If you write with that person in mind, Google understanding your images comes as a side effect.

Your next step: pick your ten best-selling products and review the alt of every gallery photo with this guide's formula. Then add it to your technical review with the ecommerce technical SEO checklist and explore more Technical SEO guides.

Frequently asked questions

What is an image's alt text?

It's the text in the alt attribute of the img tag. Screen readers used by people with visual impairments read it aloud, it appears when the image doesn't load, and it helps search engines understand what the image shows. Google says it uses alt text along with computer vision algorithms and the page's content to understand an image.

How many characters should alt text have?

Google's image guide doesn't set a character count: it asks for useful, information-rich text without keyword stuffing. In practice, a short sentence describing what sets that photo apart is usually enough. If the image contains complex information, like a size chart, it's best to also publish that data as text on the page.

Do all images need alt text?

All of them need the alt attribute, but not all need a description. Purely decorative images, like dividers or backgrounds, should have an empty alt so screen readers ignore them, and the same applies if the image repeats text that's already next to it. Product photos, linked logos, and informative graphics do need text.

How do I add alt text in WooCommerce?

In WordPress, open the Media Library, select the image, and type in the 'Alternative Text' field; you can also do it when uploading photos from the product page. Most themes use that text on the main image and in the gallery. Review each gallery photo separately: each one shows something different and deserves its own description.

Can I use artificial intelligence to write alt text?

Yes, and it saves a lot of time in large catalogs, but review the result. Vision models can confuse colors, materials, or details, and a wrong alt gives false information to someone using a screen reader. Ideally, the AI starts from the product's real name, describes what sets each photo apart, and a person approves the text before it's published.

Sources

  1. Image SEO best practices (Google Search Central)
  2. An alt Decision Tree (W3C Web Accessibility Initiative)
  3. Browser-level image lazy loading for the web (web.dev)

Written and reviewed by the SEOXtreme editorial team using official sources (Google Search Central, platform documentation, and published studies). If you spot outdated information, email us at hola@vidaxtreme.com.

Keep learning

Stop optimizing by hand

SEOXtreme does this work for you across your whole catalog, with your approval. Try it for 14 days, no credit card.

14-day free trialAudit