How to generate image alt text using AI? 4 easy ways [updated 2024]

Have you ever wondered how visually impaired people navigate the internet? The answer lies partly in alt text – those hidden descriptions of images that make the web accessible to everyone. But let’s face it: writing alt text for hundreds of images can be time-consuming and sometimes overwhelming.

That’s where AI comes to the rescue! In today’s digital world, artificial intelligence is revolutionising how we create alt text, making it easier and more efficient than ever before.

Alt text (alternative text) is a written description of an image that appears when the image can’t be displayed or when screen readers are used. While traditionally created manually, many content creators and web developers now face the challenge of managing large volumes of images requiring alt text. This is where AI-powered solutions are changing the game.

Understanding Alt Text –

A. Purpose and Benefits

  1. Accessibility for Visually Impaired Users: Think of alt text as an invisible narrator describing images to those who can’t see them. For visually impaired users relying on screen readers, alt text is their window to understanding visual content. It’s not just helpful – it’s essential for creating an inclusive digital space.
  2. SEO Advantages: Search engines love alt text! It helps them understand what your images are about, potentially improving your website’s visibility in search results. When your alt text is relevant and descriptive, it can boost your SEO performance significantly.
  3. Enhanced User Experience: Ever tried loading a webpage with slow internet? Alt text appears when images fail to load, helping users understand what they’re missing. This creates a smoother browsing experience for everyone, regardless of their internet speed or device capabilities.
  4. Legal Compliance: Many countries have laws requiring websites to be accessible to people with disabilities. Proper alt text isn’t just good practice – it’s often a legal requirement under accessibility guidelines like WCAG (Web Content Accessibility Guidelines).

B. Characteristics of Good Alt Text

  1. Descriptive yet Concise: Good alt text paints a picture with words – but keeps it brief. Think “Golden retriever puppy playing with a red ball” rather than just “dog” or a lengthy paragraph describing every detail.
  2. Context-relevant: The best alt text considers the image’s purpose on the page. For example, if you’re selling a blue dress, mentioning its color and style is more important than describing the model’s hair color.
  3. Accurate Representation: Accuracy is key! Alt text should precisely describe what’s in the image without embellishment or personal interpretation. It’s about helping users understand exactly what they would see if they could view the image.
  4. Natural Language: Write alt text as if you’re explaining the image to a friend. Use clear, simple language and avoid keyword stuffing or technical jargon. Remember, real people will be reading (or hearing) these descriptions.

Current statistics on alt text usage on the internet –

When we did our research, we could gather that being an important factor of accessibility, good alt text for images is not a common phenomenon.

  1. Missing Alt Text: Approximately 21.6% of images on home pages lack any alternative text, which means that about one in five images does not provide essential context for visually impaired users or search engines. This data has been gathered for top 1 million pages on the internet by WebAim
  2. Questionable Alt Text: Among images that do have alt text, about 14.6% contain questionable or repetitive descriptions, such as “image” or “graphic,” which do not provide meaningful information. This is also gathered by WebAim
  3. Accessibility Errors: According to the study done by Moz, missing alt text is a major contributor to accessibility errors, accounting for 61% of all homepage accessibility issues.

Latest Google’s take on alt text from SEO perspective?

Alt text is considered a ranking factor for image search. Google uses it to understand the content of images, which helps in indexing and ranking them in search results. John Mueller from Google confirmed that alt text contributes to overall page rankings as it provides context about the images and the page content as a whole.

In John Mueller’s own words, “I, I think ideally, if you have text and images, it probably makes sense to have the text directly on the page itself. Nowadays there are lots of ways to kind of creatively display text across a website. So I wouldn’t necessarily try to kind of like use text and images and then use the alt text as a way to kind of help with that. I think the alt text is a great way to help with that.

But ideally, it’s better to avoid having text and images. And the question goes on, “Should I write alt text for products for an e-commerce site since there’s already text beneath the product that describes the product?” So from a more general point of view, the alt text is meant as a kind of a replacement or description of the image.

And that’s something that is particularly useful for people who can’t look at individual images, who use things like screen readers. But it also helps search engines to understand what this image is about. And if you already have the same description for a product around the image, then for search engines, we kind of have what we need.

But for people with screen readers, maybe it still makes sense to have some kind of alt text for that specific image. And in a case like this, I would avoid the situation where you’re just repeating the same thing over and over. So avoid having a title of a product be used as an alt text for the image, but rather kind of like describe the image in a slightly different way.

So that’s kind of the recommendation I would have there. I wouldn’t just blindly copy and paste the same text that you already have on a page as an alt text for the image, because that doesn’t really help search engines and it doesn’t really help people who rely on screen readers.”

Testing the popular AI-Powered Alt Text Generation Ways –

I’ve gathered the most popular ai alt text generation ways. Some of the tools used are feature rich, others are quite simple.

  1. ChatGPT
  2. Salesforce blip-2
  3. Alt Magic
  4. GoPublish

I’ve used the same image with all the tools and tried to capture the quality and overall experience of these tools. Let’s start.

ChatGPT:

Let’s start with ChatGPT. I’m creating it in November 2024 and it’s using GPT-4o as the chat model. It’s a multimodal chat model (multimodal LLM models can take input in the form of text and files). First I simply provide the image and asked it to create alt text for the image. I also included one more instruction to keep it under 140 characters (easy to read and will mostly describe any image). It generated pretty good alt text.

The next thing I asked it to do was to provide a keyword and ask it to optimise the alt text according to the keyword. Remember to keep the prompt simple or it will start stuffing the keyword without proper understanding. Adding keywords will help in optimising the alt text for the SEO.

Link: https://chat.openai.com

Using ChatGPT for generating image alt text
Using ChatGPT for generating image alt text

Salesforce blip-2:

Blip-2 is a large language model (like GPT-4o) released by SalesForce that answers questions about images. To use it, we can provide an image, and then ask a question about that image. In this example, I’m using Replicate to run the Salesforce Blip-2 model. In this particular model implementation, the author has also added a “Caption” checkbox. On checking it, the model will directly provide the alt text.

The generated alt text is pretty good already quality wise. We can also run the generated alt text with ChatGPT asking it to add the keyword. It won’t be perfect and also will be a manual way.

Linkl: https://replicate.com/andreasjansson/blip-2

Using Salesforce Blip-2 for image alt text generation
Using Salesforce Blip-2 for image alt text generation

Alt Magic:

Alt Magic is the newest addition to tools for content writers and agencies. It’s a self serve tool currently which creates alt text for your images. It can handle bulk alt text creation too where you can just provide multiple images to the tool and it will generate alt text for all of them in a single click. It has many useful features around image alt texts.

You can also scan complete websites and check for the missing alt texts in all the pages. It can handle websites built on any platform. Though it has a separate option to generate image alt text for WordPress sites. For wordpress sites, there’s an option to import all the images from WordPress media library. It intelligently imports all the images which have missing alt text attributes.

There are multiple types of input options given for the image.

  1. Direct upload with drag-n-drop
  2. Provide URL of the image if it’s already hosted somewhere
  3. Scan a webpage and fetch all the images present on the webpage
  4. Provide URL of the images in bulk

The best customisations Alt magic has done is around the SEO optimisations. You can add keywords and blog titles for generating a highly contextual alt text for the image.

Alt Magic image alt text generation using blog title and keywords
Alt Magic image alt text generation using blog title and keywords
Alt Magic bulk image alt text generation
Alt Magic bulk image alt text generation
Alt Magic web page scanning to generate image alt texts in bulk
Alt Magic web page scanning to generate image alt texts in bulk

One more fantastic update from the Alt Magic team is their WordPress plug-in. It integrates tightly with the WordPress site generating alt text automatically whenever any image gets added in the site. You can add the image from the editor or in the library, Alt Magic picks up the image that time only and generates the alt text for the image. It can also generate alt text in bulk for the images on the WordPress site.

Alt Magic AI alt text generation settings for WordPress plug-in
Alt Magic AI alt text generation settings for WordPress plug-in

For old images with no alt text, You can either use the bulk alt text generation feature or use you can open the image in the media library in WordPress. You will get a button below the Alternative text input box. Click on that button and the alt text will get generated.

Alt Magic WordPress plug-in with AI alt text generation button in the media library
Alt Magic WordPress plug-in with AI alt text generation button in the media library

Alt Magic has an active dev team which takes suggestions and feature requests from the users. It also has chat support available full time to tackle user issues and help users in their image alt text generation work.

Link: https://altmagic.pro

GoPublish:

Last but not least, GoPublish’s AI image alt text generator is a very simple tool which can generate alt text quickly. You can just upload your image and click on the “Generate Alt Text” button. The alt text will be generated in 1-2 seconds. It’s a simple tool and does not take any keywords in the input for context and SEO optimization. For its lack of optimization, it makes up for it with its simplicity and UX experience.

After the alt text is generated, you can just click on the “Copy” button and it will get copied in your clipboard. Now paste it anywhere you need with just “ctrl + v”.

Link: https://gopublish.io/tools/image-ai-alt-text-generator/

GoPublish AI alt text generator
GoPublish AI alt text generator

C. Comparison table

Tool Pros Cons
ChatGPT Quality can be controlled as self prompting
Free for GPT-4o model
Need to generate one by one manually. Bulk option is not available.
Takes time and output format is not fixed. Will take time to edit manually.
Blip-2 One click captioning
Playground available
Need to create Replicate account
Lack of SEO optimisation
Bulk generate is not possible
Alt Magic Generate image alt text in bulk
Higher quality with the context and SEO optimisation options
Automatic alt text generation in WordPress with plug-in
Active dev team with prompt customer support
25 free alt text generations
Need to create account on Alt Magic
GoPublish Free
One click captioning
Straight-forward UX
Lack of SEO optimisation
Need to generate one by one manually. Bulk option is not available.

IV. Where Alt Text Should Be Implemented

A. Web Platforms

  • Websites and blogs
  • E-commerce platforms
  • Social media platforms
  • Instagram
  • Twitter
  • LinkedIn
  • Facebook

B. Learning Management Systems (LMS)

  • Canvas
  • Moodle
  • Blackboard
  • D2L Brightspace
  • Google Classroom

C. Content Management Systems (CMS)

  • WordPress
  • Drupal
  • Joomla
  • Wix
  • Squarespace

D. Digital Documents and Presentations

  • Microsoft Office (Word, PowerPoint, Excel)
  • Google Workspace (Docs, Slides, Sheets)
  • PDF documents
  • Digital textbooks