Terence Eden. He has a beard and is smiling.
Theme Switcher:

Should you embed alt text inside image metadata?

· 11 comments · 600 words · Viewed ~1,056 times


Not everyone can see the images you post online. They may have vision problems, they may have a slow connection, or they might be using a text-only browser. How can we let them know what the image shows? The answer is alt text. In HTML we can add a snippet of text to aid accessibility.

For example <img src="monalisa.jpg" alt="A painting of the Mona Lisa.">

Most social networks will let users add alt text to help describe their images. Brilliant!

But... People don't always add alt text when they upload an image. They may not realise it is helpful, or they don't know how to write a good description, or they may not have time to write something suitable. This leads to a frequently asked question: "Should I embed the alt text inside the image file? That way, whenever people share the image the alt text will automatically be attached!"

Here's my attempt to answer that.

Short answer

No.

Long answer

Nooooooooooooo!

Reasoned Answer

It is complicated.

On a technical level, yes. Most modern image formats allow you to add image metadata - known as EXIF. This EXIF commonly contains GPS location, timestamps, make and model of camera, etc. Here's an example from one of my photos:

Screenshot showing technical details of the metadata on a photo. It contains a copyright notice.

There are a pre-defined list of acceptable EXIF tags one of which is "ImageDescription", which is defined as:

A character string giving the title of the image. It may be a comment such as "1988 company picnic" or the like. Two-byte character codes cannot be used. When a 2-byte code is necessary, the Exif Private tag UserComment is to be used.

So, there you have it. Yes you can embed text inside an image. With the right software you can read it. So, technically, you can stuff alt text in there and have a website automatically add it to the alt attribute.

But this is only half the story. What an image represents is highly context dependent.

In her article about using AI to automatically provide image captions, Léonie Watson makes that point that alt text needs to be:

provided by a content author who knows exactly what's in the image, why its being used and the context its being used in.

Take this very real photo of a famous actress who I just got an AI to dream up.

An AI generate image based on the text "Woman, celebrity, red dress, smiling, evil eyes, holding a knife, red carpet, arm tattoo."

What's a suitable alt text for this image?

  • Famous actress Claire Flumptron standing on the red carpet.
  • Claire Flumptron shows off her brand new arm tattoo which has strange mystic runes covering her forearm.
  • Designer Giovanni Tuccini's new red dress has a small strap over the shoulder.
  • AI image where the hand is strangely deformed and the neck looks twisted beyond human endurance.
  • Smiling woman with cropped blonde hair and heavy eye makeup.
  • Last known photo of the Mayor (right). His blurry face is smiling.
  • ...

There's no "right" answer. It depends on what the image is being used to illustrate.

A picture may be worth a thousand words. But those thousand words depend on context.


Update Here's another good example of embedded alt text failing badly.

Whenever people talk about embedding alt text into images, I remember that lots of gif search services already try to do that.

Here's BlueSky's gif service. I searched for some popular memes. Each had alt-text baked in.

Take a look and tell me if you think that the embedded text conveys the sentiment of the image? If you couldn't see the animation, would you understand what was going on from that alt?

The idiot sandwich meme. The default alt text is "a man is holding a piece of bread over a woman 's face and asking what are you ?" Clip from The Hobbit with the subtitle "What about second breakfast?". The default alt text is "two men are standing next to each other talking about second breakfast". The meme of Homer Simpson walking backwards into a hedge. The default alt text is "A cartoon of homer simpson standing in a grassy area." The Chuckle Brothers looking at each other. The default alt text is "a man in a striped shirt is kissing another man in a white suit".
2025-09-07, 21:11 12 boosts 22 favorites

For more information on writing good alt text, see Harvard's Digital Accessibility​ blog and Design102's guide.


Share this post on…

11 thoughts on “Should you embed alt text inside image metadata?”

  1. Two-byte character codes cannot be used.

    That's a bummer. It means ImageDescription tag is obsolete, as it doesn't support most of the languages from so many countries around the world.

    Reply

  2. Funny you post this, a revitalized mastodon app is getting this exact feature added. It extracts the metadata caption and inserts it as the suggested alt text (tho you are presented with the value can change it). I never thought about the metadata being uploaded to the server (including location data yikes) so I’m hoping the fediverse is doing the right thing and stripping that data before uploading…

    Reply

    1. It almost certainly doesn't strip before uploading. But it will probably strip before storing and displaying. That's how most services do it.

      Reply

  3. @Edent IPTC also announced two specific tags for accessibility descriptions instead of the the generic caption, which might not always prioritise accessibility concerns. You can see a nice example at https://www.publishersweekly.com/pw/by-topic/digital/content-and-e-books/article/87947-how-publishers-can-get-alt-text-right.html, on where these differences matter.

    https://www.scribelytribe.com/post/one-giant-leap-for-accessibility-meet-the-new-photo-metadata-standardsHow Publishers Can Get Alt Text Right

    Reply | Reply to original comment on tatooine.club

  4. @Edent @simevidas I certainly agree that a default image description shouldn't be used automatically without prompting the content author to review / edit it. But there are also lots of times when it would be good enough, or a good start.

    From that perspective, there is a difference between passing the metadata silently inside the image file and passing it as a complex data object that can be used to pre-populate an alt text field.

    Reply | Reply to original comment on front-end.social

  5. @Edent "so you end up with wrong alt text" wrong!
    My suggestion is that you have to choose between using the provided alt-text, editing it or writing your own while uploading media.
    Why does everyone act like metadata is as flexible as text carved in stone?

    You then choose whether you want to overwrite the files alt text or have yours just display with your post (because the previous is more general and yours focuses on what you're trying to convey with your specific post for example).

    This whole suggestion is not to get people who don't care about providing good alt text off the hook, but to make life a little easier for those who do care.

    Reply | Reply to original comment on climatejustice.social

  6. What I kind of want for Bluesky (and indeed any federated system, but it fits well with Bluesky's composable bits) is to layer in a feed of good alt text. If I had a way to sometimes write better alt text for someone else's image, I would. No idea how many others would, admittedly.

    Reply | Reply to original comment on bsky.app

  7. @Edent So what? Nothing about having alt text embedded in EXIF data stops you from being able to edit it for specific contexts in the rare cases where it needs to be.

    I just want it to be easier to make my images accessible. Being able to compose thoughtful descriptions in advance, once, rather than again and again every time the image is used would solve 95% of the use cases better than what we currently have.

    Don’t make accessibility harder than it needs to be.

    Reply | Reply to original comment on federate.social

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.

See allowed HTML elements: <a href="" title="">
<abbr title="">
<acronym title="">
<b>
<blockquote cite="">
<br>
<cite>
<code>
<del datetime="">
<em>
<i>
<img src="" alt="" title="" srcset="">
<p>
<pre>
<q cite="">
<s>
<strike>
<strong>

To respond on your own website, write a post which contains a link to this post - then enter the URl of your page here. Learn more about WebMentions.