How Do You Write Alt Text for Images That Helps SEO?

Ammar Sohail 4 min read
How Do You Write Alt Text for Images That Helps SEO?
In this post
  1. What is alt text and why does Google care?
  2. How do you write alt text that works?
  3. When should alt text be left empty?
  4. What about image file names?
  5. How do you add alt text in WordPress and Shopify?
  6. How do you check what you already have?
  7. Your next step

Good alt text for images describes what the picture shows, in a short plain sentence, and fits the page it sits on. That's it. It helps people using screen readers, and Google reads it too.

Most small business sites get this wrong in one of two ways. The alt box is empty, or it's stuffed with search terms. Here's how to fix both without spending a weekend on it.

What is alt text and why does Google care?

Alt text is the alt attribute on an image tag. Browsers show it if the image fails to load. Screen readers read it aloud to people who can't see the picture.

Google's image SEO guidance says it uses alt text, along with computer vision and the surrounding page content, to understand what an image is about. So it's one of the few places where accessibility and search want exactly the same thing: a clear, honest description.

How do you write alt text that works?

Look at the image and ask what you'd say if you were describing it over the phone. Then write that, in context of the page.

  • Keep it short. One sentence is plenty. Nobody wants a paragraph per photo.
  • Be specific. "Electrician fitting a consumer unit in a kitchen" beats "electrician".
  • Skip "image of" and "photo of". The screen reader already announces that it's an image.
  • Match the page. The same photo might need different alt text on a service page and in a blog post.

A quick example. Say you run a bakery and the product page shows a birthday cake. Weak alt text: "cake". Stuffed alt text: "cheap cake best cake shop cake delivery". Good alt text: "Three-tier chocolate birthday cake with white icing and fresh strawberries".

Where should you use your keyword?

Only where it's true. If the image really shows what your page is about, the term will often fit in naturally. If it doesn't, leave it out. Google's guidance warns that keyword stuffing makes for a poor experience and can make a site look like spam.

When should alt text be left empty?

Some images are just decoration: a divider line, a background swirl, an icon that sits next to text saying the same thing. For those, use an empty attribute (alt=""). Screen readers then skip the image instead of reading out something pointless.

Don't remove the attribute altogether. A missing attribute and an empty one aren't the same thing, and the empty one tells assistive tools to skip it on purpose.

Logos and buttons are different. A logo that links to your homepage needs alt text that says where the link goes, such as "Wolf Tech Agency home". If a banner image contains words, repeat them in the alt text so nobody misses them.

What about image file names?

Google also recommends short, descriptive file names. Its own example is that a name like black-kitten.jpg tells it more than a camera code such as IMG00023.JPG. Rename files before you upload them, not after, because changing a name later changes the image's URL.

Use lowercase words joined by hyphens. Avoid image1.jpg and final-final-2.png. It takes ten seconds per file and saves a lot of tidying up later.

How do you add alt text in WordPress and Shopify?

In WordPress, open the Media Library, click an image and fill in the "Alternative Text" box. In the block editor you can also select an image block and edit the alt text in the sidebar. We cover this kind of routine upkeep in our WordPress development work.

In Shopify, open the product, click the image and choose to edit alt text. Do it for every product image, not just the first one, as shoppers using screen readers will go through all of them.

Got hundreds of images already? Start with your homepage, your top five service or product pages and your logo. Those matter most. You can tidy the rest as you edit pages.

How do you check what you already have?

Open a page, right-click an image and choose Inspect. You'll see the image tag and whatever sits in the alt attribute. For a whole site, an SEO crawler tool can list images with missing alt text.

Once you've fixed the images, make sure Google can find the pages again. Our guide on how to submit a sitemap to Google Search Console shows how. Pair that with a sensible meta description and your pages are in good shape.

Your next step

Pick your five most visited pages today and check each image. Write alt text as if you were describing the page to a friend over the phone. If you'd rather hand it over, our SEO optimisation service includes on-page fixes like this, and you can get in touch for a quote.

Common questions

How long should alt text be?

Aim for one short sentence, keep it short. Say what matters about the image in the context of the page, and stop there.

Does alt text affect rankings directly?

Google says it uses alt text to understand images, so it helps your images show up in image search. It's not a magic ranking switch for the whole page, so write it for people first.

Do I need alt text on every image?

Every meaningful image needs a description. Purely decorative images should have an empty alt attribute, so screen readers skip them.

You might also like

Message Us