Fix guides · Accessibility
How to add alt text to images (and when to leave it empty)
Images without alt text are silent or confusing for screen reader users and invisible to search engines. How to write good alt text and add it on Shopify, WordPress, Webflow, Wix, Squarespace and Next.js.
- Time to fix
- 5–20 minutes
- Skill needed
- No code
- Who notices
- Blind and low-vision visitors using screen readers, and search engines
Why it matters
Screen readers read an image's alt text aloud. When it's missing, many read the file name instead ("IMG underscore 2041 dot jpeg") or skip the image, so a product photo or a chart simply disappears for that visitor.
Alt text also tells search engines what an image shows, which helps your images appear in image search.
“16.2% of all home page images (10.8 per page on average) had missing alternative text (not counting alt="").”
Before you start
- Describe what the image communicates in this spot, in a short sentence: "Blue linen shirt, front view", not "image of shirt".
- If an image is a link or a button, describe where it goes or what it does: "Go to cart", not "cart icon".
- Purely decorative images (dividers, background patterns) should have empty alt text (alt=""), so screen readers skip them. Empty is different from missing: missing is what this issue flags.
- Don't repeat the caption or nearby text in the alt text; screen readers would read it twice. If the words are already next to the image, describe something else or leave the alt empty.
- Inline SVG graphics that carry meaning need a name too: add role="img" and an aria-label, or a <title> inside the SVG.
Fix it on your platform
Shopify
- Product images: from your Shopify admin, go to Products and click the product.
- Click a product image to open Preview media, then click Add alt text.
- Enter your alt text, click Save alt text, then close the preview.
- Images in theme sections (banners, image with text): check the section's settings in the theme editor. If your theme has no alt text field there, ask your theme developer, since it's set in the theme's code.
WordPress
- Select the image in the block editor and open the block settings sidebar (the Settings button next to Save or Publish).
- On the Content tab, fill in Alternative text. For a decorative image, tick Mark as decorative instead.
- Alt text added in the block only applies to that page. To set a default for every future use, edit the image in the Media Library instead.
- Images added by your theme, a slider or a page builder are set in that tool's own settings.
Webflow
- Open the Assets panel, click the settings cog on the image, and either write a description (Descriptive) or choose Decorative. Every use of the image inherits this.
- To change it for one placement only, select the image on the canvas, open Image settings, and use the Alt text dropdown to choose a custom description or Decorative.
- Webflow's Audit panel lists images that are still missing alt text.
Wix
- In the Wix Editor, select the image and click the Settings icon.
- Enter a description under "What's in the image?".
- Galleries use each image's title as its alt text by default. To set separate alt text, edit the images in the gallery's settings.
- Wix's Accessibility Wizard can also scan your site and list images that are missing alt text.
Squarespace
- Open the page with the image and click Edit.
- Open the image block editor and click the Content tab.
- Enter your text in the Image alt text field, then save.
- Gallery sections and auto layouts have their own alt text fields in the section editor.
Next.js
- next/image requires an alt prop on every image. Give meaningful images a description and decorative ones an empty string.
- For plain <img> tags (in Markdown or CMS content), make sure your renderer passes the alt text through.
<Image src={shirt} alt="Blue linen shirt, front view" />
<Image src={divider} alt="" /> {/* decorative */}Any other site
- Add an alt attribute to every <img> tag. Use alt="" for decorative images, never leave it out.
<img src="shirt.jpg" alt="Blue linen shirt, front view">
<img src="divider.svg" alt="">Check that it's fixed
- Re-run your StudioLNC audit: the alt text issue should be gone, or list fewer images.
- To spot-check one image, right-click it, choose Inspect, and look for the alt attribute on the <img> tag.
Find every issue like this on your site
Free audit of performance, accessibility, SEO and security, with fixes for your platform.