The alt attribute (alternative text, or alt text) is an HTML attribute of the tag that describes the content of an image in text form. It serves a dual purpose: accessibility (screen readers for visually impaired users read it aloud) and SEO (search engines cannot โseeโ images โ they read the alt text to understand what they represent). For e-commerce stores with hundreds or thousands of product photos, optimising alt texts is a significant and often under-exploited SEO lever.
Why alt text matters for SEO
Google cannot visually analyse an image the way a human can. It relies on textual signals โ alt text, file name, surrounding text, caption โ to understand what an image represents. A descriptive alt text containing relevant keywords helps Google to: 1) correctly index the image in Google Images, which is a significant traffic channel for e-commerce; 2) reinforce the topical relevance of the page for targeted queries; 3) improve rankings for image search queries that drive direct visits.
Google Images accounts for an average of 22% of all web search volume (source: SparkToro). For visual e-commerce queries โ โwomenโs blue running shoeโ, โbohemian summer dressโ โ Google Images is often the first step in the purchase journey. A properly tagged image can drive direct traffic to the corresponding product page.
How to write effective alt text
Effective alt text precisely describes what the image shows, naturally integrates relevant keywords without over-optimisation (keyword stuffing), and remains concise โ ideally between 5 and 15 words, or 50 to 125 characters. Google truncates alt texts that are too long in its image results.
- Bad: alt="" (empty) or alt="image" or alt="IMG_4521.jpg" โ no SEO or accessibility value whatsoever.
- Bad: alt="running shoe sport shoe women's shoe women's running" โ keyword stuffing that gets penalised.
- Good: alt="Women's Nike Air Zoom Pegasus running sneaker in navy blue" โ descriptive, natural keywords.
- Good: alt="Close-up of the Gore-Tex waterproof sole on the Nike Pegasus Trail 4" โ description of a detail view.
- For decorative images (dividers, purely visual icons): alt="" (empty) is correct and preferable to a forced description.
Alt text โ title attribute
Managing alt texts at scale in e-commerce
A store with 1,000 products and 5 photos per product means 5,000 images to optimise. The e-commerce challenge is to industrialise this optimisation without sacrificing quality. Most platforms, including PrestaShop, allow you to define an automatic template for alt texts based on product attributes (name, colour, brand, reference). This approach is better than leaving the alt empty, but inferior to custom writing for strategic products.
A realistic strategy involves manually customising the alt texts for top-selling products (top 20% of sales, featured products, frequently out-of-stock products due to high demand), and using an automatic template for the rest. The ideal template for PrestaShop product images is: โ[Product name] [Colour/Variant] โ [Brand] | [Store name]โ.
The image file name: an additional SEO signal
The image file name is an SEO signal that complements the alt text. Renaming IMG_4521.jpg to women-running-sneaker-nike-pegasus-blue.jpg helps Google understand the subject of the image even before reading its alt text. In practice, PrestaShop generates file names from the product name at upload time โ by ensuring that product names are well written, image files automatically receive relevant names.
Accessibility
Screen readers use the alt text to describe images to visually impaired users. This is a legal requirement in many countries.
Google Images
Alt text is the primary signal for indexing images in Google Images and driving visual e-commerce traffic.
Topical relevance
Well-written alt text strengthens the semantic coherence of the page and improves its overall ranking.
Alt text and CDN: how Lexiik preserves your attributes
When Lexiik rewrites image URLs to serve them from the Cloudflare CDN, the alt and title attributes of your tags are not modified. Lexiikโs PrestaShop override only operates at the level of the image source URL generation, not at the level of the full HTML element. Your optimised alt texts remain intact and continue to be read by Google during its crawl.
Furthermore, Lexiik indirectly improves the discoverability of your images in Google Images: by serving images from a CDN with stable URLs and optimal cache headers, Google can index and update image content more efficiently, with fewer timeout issues or errors during crawling.