How to Write Alt Text for Any Image

Not every image wants the same alt - some get a sentence, some get nothing, some need the data spelled out. A decision tree by image type, for accessibility, SEO, and AI search.

The words "Write better alt text." in heavy off-white type in the lower band of a cool charcoal-to-slate-blue gradient cover with a subtle grain, above the smaller line "For people, search, and AI.", the featured image for this post. Try this template

Most alt-text advice hands you one rule - write a short description - and then treats every image as if it were the same. It is not. A photo, a chart, a logo that links somewhere, a divider line: each wants a different alt, and a couple want none at all. Get the type right and the sentence writes itself. The question is never only “what is in this image” - it is “what is this image doing here.” Answer that, and you have the alt.

Three things read that one attribute now: a screen reader speaking the page aloud, a search crawler indexing your images, and - newer - an AI assistant that cannot see the picture and leans on your words to know what it is. One honest line serves all three. The trick is knowing which kind of line each image needs. (This is the general version; for the cover image specifically, the answer is always one plain sentence.)

Three readers, one attribute

It is worth the ten seconds because three different audiences depend on it:

  • Screen readers. Someone who cannot see the image hears your alt in its place. It is the accessibility baseline - the web content guidelines require a text alternative for non-text content - and a page full of undescribed images is a page full of dead ends.
  • Search. Google calls alt text the most important metadata attribute for an image. It is the line a crawler reads to understand the picture and rank it, and one of the few image signals that touches search directly rather than indirectly.
  • AI search. The new one. ChatGPT, Perplexity, and Google’s AI Overviews lean on text more than vision when they index and answer - they read your alt text and the words around the image to know what it shows and whether to surface it. Specific, honest alt is now one of the few image signals an AI answer can actually use.

One sentence, three wins - but only if it is the right sentence for the image.

The decision tree: five kinds of image

Ask one question first - would a reader miss anything if this image vanished? - then match the image to a type.

Image typeWhat the alt should sayExample
Informative (photo, simple graphic)One plain sentence of what it showsa single tree on a misty hillside at dawn
Functional (the image is a link or button)The action or destination, not the picturea magnifying-glass button is Search, not magnifying glass icon
Image of text (quote card, screenshot of words)The actual words in the imageQuote: "Ship it, then fix it"
Complex (chart, graph, infographic)A short label plus the takeaway; full data nearbybar chart of signups by month, peaking in March
Decorative (texture, divider, flourish)Nothing - an empty alt=""alt=""

A few of these trip people up, so the detail:

  • Functional images describe a job, not a scene. If the image is wrapped in a link, the alt should say where the link goes; the reader needs the destination, not a description of the glyph.
  • Images of text should carry their own words. Better yet, avoid locking text inside an image at all - but when you have to (a headline baked into a cover), put that exact text in the alt so a screen reader hears what everyone else sees.
  • Complex images will not fit in an attribute. Name the chart and its one finding in the alt, then put the real numbers in text or a table on the page, where a sighted reader benefits too.

The one move to never make is leaving the attribute off. A missing alt makes a screen reader read the file name - IMG_4032.jpg, out loud. An empty alt="" is a deliberate “nothing to describe here.” Decorative images get the empty one, on purpose.

The mistakes that cut across every type

Whatever the image, the same few habits sink the alt:

  • “Image of,” “photo of.” The attribute already means image. Start with the subject.
  • Keyword stuffing. A jammed-in phrase reads as spam to Google and as noise to a screen reader. Describe the picture; let a keyword land only if it honestly fits. (The cover-alt guide goes deep on this.)
  • Copying the caption. A caption (“Photo by Jane Doe”) is read by everyone and credits or comments; alt text stands in for the image. Copying one into the other leaves a blind reader with the credit and none of the picture.

The one question, every time

You do not have to memorize five categories. For any image, ask what a person would lose if it disappeared:

  • Nothing - empty alt="".
  • The thing it shows - describe it in a sentence.
  • The words in it - type them out in the alt.
  • Where it goes - name the action or destination.
  • Data - put the numbers in text nearby, and summarize the takeaway in the alt.

That is the whole tree. Alt text is not one rule; it is one question, asked once per image - what is this doing here? - and answered in a plain line. Do that, and the same ten seconds earns the accessibility win, the search win, and now the AI-search win. Skip it, and you have left blank the one part of an image that speaks to a machine and to a reader who cannot see it.