Skip to content
Accessible Cart

Fixing “Image elements do not have [alt] attributes” in Shopify

Missing alt text has two sources in Shopify: theme code that drops the alt attribute, and product images without descriptions.

Found on 29.8% of 3,151 Shopify homepages we tested in our 2026 study.

What the message means

Every image needs an alt attribute. Images that carry information need a description; purely decorative images need an empty alt="" so screen readers skip them.

Fix the theme code

Use the image_tag filter and always pass alt. Fall back to something meaningful, such as the section heading:

{{ section.settings.image
  | image_url: width: 1500
  | image_tag: alt: section.settings.image.alt | default: section.settings.heading | escape }}

{%- comment -%} decorative image: empty alt on purpose {%- endcomment -%}
{{ block.settings.icon | image_url: width: 64 | image_tag: alt: '' }}

Fix the product images

Product image alt text is stored with the product, not in the theme. You can edit it per image in the product admin, or in bulk: export products as CSV, fill the “Image Alt Text” column, and import the file with “Overwrite products with matching handles”.

Describe what's visible and matters for buying: color, material, angle. “Wool rug, beige, top view” beats “image of rug” or a list of keywords.

More guides