Accessibility is the job. Search is the side effect.
The alt attribute exists so that a non-text element has a text equivalent. WCAG's first success criterion — 1.1.1, Non-text Content — is exactly this requirement, and it predates anyone caring about image search. A blind user browsing your product page hears the alt text where a sighted user sees the photo. If the alt says img_4471_final_v2, that user learns nothing.
In India this has weight beyond good manners. The Rights of Persons with Disabilities Act, 2016 requires accessibility standards for services, and the government's own web guidelines are built on WCAG. If you sell to government or large enterprises, accessibility conformance shows up in procurement questionnaires.
Search engines read the same attribute because it's the most reliable plain-language description of an image on the page. Useful for image search, mildly useful as page context, and not a ranking lever you can pull hard.
When to leave it empty on purpose
Not every image carries meaning. Dividers, background flourishes, a decorative icon sitting next to a text label that already says the same thing — describing these out loud makes a page worse to listen to, not better.
For those, use an explicitly empty attribute: alt="". That tells assistive technology to skip the image entirely. What you must not do is leave the attribute off altogether, because several screen readers fall back to announcing the filename, and nobody needs to hear hero-banner-v3-compressed-final.webp read out character by character.
- Empty alt: decorative dividers, background textures, icons that duplicate adjacent text, spacer images.
- Described alt: product photos, charts, screenshots, infographics, team photos, anything carrying information not in the surrounding copy.
- Linked images: the alt text becomes the link's accessible name, so describe the destination, not the picture. An image link to your pricing page should read "Pricing", not "blue button".
- Charts and data images: the alt gives the takeaway in a sentence; the detail belongs in a caption or a table below it, where everyone can read it.
Rewriting ecommerce product alt text
Product catalogues are where alt text goes to die. A theme fills it with the SKU, or a plugin fills it with the target keyword, or nobody fills it at all. Here's the pattern we apply: describe what a customer would see, in the order they'd notice it — product type, then the distinguishing attribute, then colour or material, then context if the shot has any.
| The image | What catalogues usually put | What it should say |
|---|---|---|
| Running shoe, side view | running shoes buy online india best price | Grey mesh running shoe, side view, with a white cushioned sole |
| Cotton kurta on a model | kurta kurta for men cotton kurta online | Model wearing a full-sleeve indigo cotton kurta with a mandarin collar |
| Silver hoop earrings on white | IMG_2043 | Pair of thin silver hoop earrings, about two centimetres across |
| Coffee grinder, close crop of dial | coffee grinder best coffee grinder india | Close-up of the grind-size dial on a stainless steel burr grinder |
| Sofa in a styled living room | sofa furniture home decor sofa set | Three-seat beige fabric sofa in a living room with a wooden coffee table |
| Size chart graphic | size chart | Size chart: chest and length measurements in inches for sizes XS to XXL |
Length, and the platforms with their own version of this
There is no maximum length in the HTML spec. The commonly cited ceiling of about 125 characters comes from screen reader behaviour rather than any standard, and it's a good discipline anyway: if you need three sentences, the image is carrying information that belongs in the page copy where everyone can read it.
Social platforms have their own fields for the same thing. Instagram auto-generates a description of your image and lets you override it with custom alt text in the advanced settings before posting; LinkedIn and X both offer an alt field on image uploads. Writing them is the same discipline as on a website, and on Instagram it's one of the few genuine text signals attached to a post — see Instagram SEO for where that fits.
One last thing worth saying: alt text does nothing for the file weight problem. A 4 MB hero image with perfect alt text still fails Core Web Vitals. Compress first, describe second.