Generate Alt Text of Images Using Artificial Intelligence

#Tools & Facts

7th February 2019

Apple, Amazon, Tesla – these are just a few of the global brands that benefit from the use of artificial intelligence and cognitive technology. Your business can go in their footsteps by taking advantage of AI-generated image alt text on your website.

How to generate image alt text

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 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.

And while you might be fine doing the same for a few images, it defeats the purpose. As with almost everything, there’s a WordPress plugin to help you.

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 (with the “price subject to change” caveat). There’s a detailed installation guide on the plugin’s page.

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 crafting alternative text for images should be a part of it.

We highly recommend revising the AI-generated alternative text. Pictures with little detail usually get spot-on descriptions, but in our example, the cognitive service doesn’t recognise that Elon Musk is charging the car or that the car is a Tesla. Depending on the context, this may or may not matter.

In the end, it’s all for your visitors. Improve their experience by making your website accessible and reap the rewards.

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.

Did you like the article?

Be the first one to get notified when we publish a new blog post. As a bonus, you’ll receive our entire library of resources for free.

Sign up now

Here’s What You Should Do Next

If you’d like us to work on your website to increase your profits, please get in touch. No matter where you are in the world.

Talk to us

If you are a little unusure whether we are a good fit for each other, head over to this page to learn about our typical clients.

See who we work with

Do you want profit?

Download these FREE resources and optimise your website for conversions.

Included in our resources:

  • Discover how to optimise your website for conversions and grow your business.
  • Learn how to optimise your website using modern SEO techniques.
  • Find out ways of making your website profitable to your business.
  • Plus email notifications of industry insights, tools and tips to help your business grow.

We will never sell, rent or trade your personal information with anyone. Pinky promise.