Design & UX

How Anyone Can Generate Image Alt Text Using Artificial Intelligence

It's vital to add alt text to informative images on your websites. While we encourage you to learn the ins and outs of writing good alt text, we appreciate updating hundreds, or even thousands of images can be overwhelming.

That’s why we’ve researched how you can generate alt text using artificial intelligence – no technical skills required! A WordPress plugin offers the most straightforward way to add alt text to images in bulk, but we’ve found alternatives that work with any CMS.

How to generate image alt text for any website – for free

Microsoft's Cognitive Services caption a picture of Elon Musk in front of a red Tesla as "Elon Musk standing in front of a red car".
A picture of Elon Musk analysed in the Azure Computer Vision API.

You can analyse an image by going to the Image Processing with Computer Vision API site. The tool is free and provides an abundance of information. From accent colour, dominant background and foreground colours, through facial recognition, all the way to a list of tags, suggested caption and identifying adult and “racy” content.

The AI-generated caption for the above image is “Elon Musk standing in front of a red car.” Not only does the tool identify it’s Elon Musk, but it also estimates his age – and isn’t very far off. The picture was taken around 2014 when Elon was 42.

Generate image alt text in WordPress

Automatic Alternative Text uses Microsoft’s Cognitive Services Computer Vision API to generate image alt text for pictures uploaded when the plugin is active.

Automatic Alternative Text WordPress plugin captions a picture of a lying lion as "a lion lying in the grass".
Automatic Alternative Text plugin in action.

Setting up the plugin is easy but requires an API key which you can acquire from Microsoft for free at the time of writing this article (with the “price subject to change” caveat). There’s a detailed installation guide on the plugin’s page.

When and how should you use alt text

Alt text is not an SEO technique

Always verify the output of these tools and adjust it to provide all the necessary information. Alt text is not an SEO technique that helps you rank. It’s not about just having mediocre alt text. The purpose of alt text is to provide captions of informative images for people that rely on screen readers to consume content.

Decorative images should have empty alt text

If the image isn’t an integral part of your content, it shouldn’t have alt text. Instead, it should be empty (alt=””), so that the screen readers know to skip these images.

Another step towards website accessibility

We have highlighted the importance of alternative text in a recent article about website accessibility and now you can make your website accessible for everyone with the use of artificial intelligence.

It’s important to not get too comfortable having the help of AI. You should develop a habit of crafting accessible content and writing alternative text for images should be a part of that exercise.

PS In case you were wondering, the Elon Musk photo was identified as neither adult content nor a racy picture. Sorry Elon, you’re only 1.5% racy.

The adult content and racy scores for the picture of Elon Musk were 1%.
Elon Musk isn’t racy.

Originally published Feb 07, 2019 9:54:25 AM, updated June 15 2021.

Google rating Navigation line
Menu Scroll button