Quantcast
Viewing all articles
Browse latest Browse all 71

Adding ALT text to article thumbnails on social media

Image may be NSFW.
Clik here to view.
A tinted screenshot of a Mastodon post where an article is shared. The featured image thumbnail is overlaid with a tooltip that contains the alt text describing the image.

If you’ve been running your own personal website or a blog for a while, you are likely familiar with the og:image and twitter:image meta tags that let you specify an image that will be shown when you or someone else shares a link to your site or an article on social media.

Did you also know that there are accompanying meta tags that let you provide alt text for this image?

That would be og:image:alt and twitter:image:alt.

Here’s an example from this very page.

<meta 
  property="og:image" 
  content="https://stefanbohacek.com/wp-content/uploads/2024/12/og-image-alt-twitter-image-alt-social-media-alt-text.png" />
<meta 
  property="og:image:alt" 
  content="A tinted screenshot of a Mastodon post where an article is shared. The featured image thumbnail is overlaid with a tooltip that contains the alt text describing the image." />
<meta 
  property="twitter:image:src" 
  content="https://stefanbohacek.com/wp-content/uploads/2024/12/og-image-alt-twitter-image-alt-social-media-alt-text.png" />
<meta 
  property="twitter:image:alt" 
  content="A tinted screenshot of a Mastodon post where an article is shared. The featured image thumbnail is overlaid with a tooltip that contains the alt text describing the image." />

Yet another tool to make the web more accessible to everyone!

Folks who run their own site/blog, did you know that you can add alt text to the images that show up on social media when your articles are shared?

og:image:alt
twitter:image:alt

— Stefan Bohacek (@stefan@stefanbohacek.online) 2024-12-12T15:16:10.186Z


Viewing all articles
Browse latest Browse all 71

Trending Articles