Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Alt text is added where a website outputs a thumbnail—not to the directory or image file itself. Edit the image’s media record or content field in your CMS, or add an alt attribute in the HTML or template. Then check the thumbnail in its page context: describe informative images, use alt="" for decorative ones, and make a linked thumbnail’s text convey its link’s purpose.

Why a directory does not determine thumbnail alt text

A directory stores image files; it does not tell a screen reader what an image means on a particular page. The text alternative belongs to the image element the site renders, and its wording depends on the image’s purpose in context. A generated thumbnail is still an image element, even when the CMS creates a smaller version of the original file.

That distinction also applies to storage folders and image styles. A folder setting controls where files are stored; an image style or generated size controls how an image is displayed. Neither supplies meaningful alternative text by itself.

Choose alt text based on the thumbnail’s purpose

Informative thumbnail

Describe the information a reader needs from the image. Keep the wording concise and relevant to the surrounding page rather than mechanically listing every visible detail.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Linked thumbnail

When the image is the link, its alternative should communicate the link’s destination or function. For example, if a thumbnail links to a guide, the text should help a non-visual reader understand that activating it opens the guide.

Decorative thumbnail

If the image adds no information and is only decorative, use an empty value: alt="". This lets assistive technology skip it rather than announcing an unhelpful filename or description.

Do not rely on the filename

A filename such as IMG_4821.jpg or blue-widget-thumb.jpg is not a considered alternative. WordPress accessibility guidance warns that if the alt attribute is omitted, a filename may be used or announced. Add the attribute and decide what the image does in context.

Add alt text in WordPress

  1. In the dashboard, open Media > Library, select the image, and open its attachment details or Edit Media screen.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    Rank #2
  2. Enter the text in Alternate text, then save or update the media record.

  3. Open the page or post containing the thumbnail. If it is displayed in an Image Block, inspect the block’s alt-text setting too; the wording appropriate for that placement may differ from the reusable media description.

  4. Preview the page and confirm the rendered thumbnail has the intended alternative text. WordPress can generate smaller image subsizes and output a thumbnail-sized image, so do not assume the filename or file path supplies the text.

Add alt text in Drupal

  1. Identify the image field used by the content type or media workflow that places the thumbnail on the page.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  2. When adding the image to content, enter the alternative text in the image field. The field may also have a default directory setting for uploaded files; that setting is separate from alt text.

  3. Review the image style used for the thumbnail. Image styles can scale, crop, or otherwise transform the display image, but the text alternative still needs to describe its meaning or function.

  4. Inspect the rendered page to ensure the thumbnail has the expected alt text and that the wording fits its use there.

For an existing site with many empty alt values

Drupal’s Image Alt Fallback project documents a filterable media table and configurable handling of empty alt values for Drupal 10 and 11. Treat it as a transitional safety net, not a replacement for meaningful text stored on the media or file record. Before adopting it, check its current compatibility, configuration requirements, and fit for your site.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set alt text in HTML or a template

Ensure every rendered <img> has an alt attribute. Use descriptive text for informative images, an empty value for decorative images, and wording that communicates the link’s purpose when an image is the content of a link.

<!-- Informative thumbnail -->
<img src="/images/mountain-trail-thumb.jpg" alt="A hiker walking along a mountain trail">

<!-- Decorative thumbnail -->
<img src="/images/blue-divider-thumb.jpg" alt="">

<!-- Thumbnail is the link -->
<a href="/guides/camera-basics/">
  <img src="/images/camera-guide-thumb.jpg" alt="Read the camera basics guide">
</a>

The practical test is whether replacing the image with its alt text would preserve the page’s meaning. If a template omits the attribute, fix the template or the data source that populates it; changing a file’s name alone does not create an accessible text alternative.

Verify the result in context

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If you need a clean screenshot of the page to review its rendered thumbnail, ScreenshotNeo can return a screenshot with one request. It is a screenshot API and MCP server for developers, not a tool that writes or audits alt text. See ScreenshotNeo and its API documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

Sign up for 1,000 free screenshots a month with no card.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.