Title: Auto Alt Text
Author: Valerio Monti
Published: <strong>March 10, 2024</strong>
Last modified: March 25, 2026

---

Search plugins

![](https://ps.w.org/auto-alt-text/assets/banner-772x250.png?rev=3052057)

![](https://ps.w.org/auto-alt-text/assets/icon.svg?rev=3052057)

# Auto Alt Text

 By [Valerio Monti](https://profiles.wordpress.org/valeriomonti/)

[Download](https://downloads.wordpress.org/plugin/auto-alt-text.2.8.0.zip)

 * [Details](https://az-tr.wordpress.org/plugins/auto-alt-text/#description)
 * [Reviews](https://az-tr.wordpress.org/plugins/auto-alt-text/#reviews)
 * [Development](https://az-tr.wordpress.org/plugins/auto-alt-text/#developers)

 [Support](https://wordpress.org/support/plugin/auto-alt-text/)

## Description

This plugin implements the automatic creation of alt text for images uploaded to
the media library. The alt text is generated at the time of uploading the image 
and it is also possible to generate the alt text for images already present in the
media library.

To generate the alt text, you can choose to use the artificial intelligence of OpenAI
or Azure, or decide if you simply want to copy the title of the article where the
image is uploaded or the name of the image.

Clearly, using artificial intelligence will allow for a more accurate and useful
alt texts.

### Features

This plugin allows you to generate alt texts in the following ways:
 – using Openai
APIs (GPT-4o, GPT-4o Mini, o1 Mini) – using Anthropic Claude API – using Azure APIs
for computational vision; – recovering the title of the image – recovering the title
of the article in which the image is uploaded

#### Getting Started

After installing the plugin, click on the ‘Auto Alt Text’ menu item.

### Choice of Generation Method

Select the Generation Method you prefer

### OpenAI’s APIs

In your OpenAI account, retrieve the following data to enter on the options page:
–
API Key

Choose the model you want to use for generating the alt text.
 Enter a prompt for
generating the alt text according to your needs.

### Claude Anthropic’s APIs

In your Anthropic account, retrieve the following data to enter on the options page:
–
API Key

Choose the model you want to use for generating the alt text.
 Enter a prompt for
generating the alt text according to your needs.

### Azure’s APIs

On your Azure account, create a Computer Vision instance and retrieve the following
data to enter on the options page:
 – Computer Vision API Key – Computer Vision 
Endpoint

If you want to generate an alt text in English, save the options without filling
in any other fields.

If you want to generate an alt text in a different language, on your Azure account,
create a Translator instance and retrieve the following data to enter on the options
page:
 – Translator Instance API Key – Translator Instance Endpoint – Translator
Instance Region

After entering this data, save the options.

Select the desired language and save the options again.

### Title of the article

For this generation method, there are no options to set as the alt text will be 
generated by copying the title of the article in which the image is uploaded.

In case the article is not uploaded as an attachment of an article, the “Title of
the attachment” method will be used as a fallback.

### Title of the attachment

For this generation method, there are no options to set as the alt text will be 
generated by copying the title of the image.

### Functioning

Once the plugin is configured, each time an image is uploaded to the media library,
an alt text will be automatically set based on the selected generation method.

For images already in the media library, you can create bulk alt texts. Open the
Media Library in the “list” view, select the images for which to generate the alt
text, and choose the “Generate alt text” bulk action. (Depending on the number of
images chosen and their weight, this may take some time.)

You can also generate the alt text of a single image directly from the media library.
Open the Media Library in “grid” mode, choose the image for which to generate the
alt text, and click the “Generate alt text” button. In no time the alt text field
will be overwritten by the generated description.

### WP-CLI

If you prefer generating alt text in batch (e.g., to avoid processing in the Media
Library UI), you can use WP-CLI.

Generate alt text for a list of attachment IDs:

    ```
    wp auto-alt-text generate --ids=123,456,789
    ```

Process all image attachments in batches:

    ```
    wp auto-alt-text generate --all --limit=200 --offset=0
    wp auto-alt-text generate --all --limit=200 --offset=200
    ```

Dry run (no metadata updates):

    ```
    wp auto-alt-text generate --ids=123,456 --dry-run
    ```

Force overwrite of existing alt text (even if “Keep existing alt text” is enabled):

    ```
    wp auto-alt-text generate --all --limit=200 --offset=0 --force
    ```

**Notice**: If you choose one of the methods that involves the use of external APIs,
the upload times for images in the media library might increase because it requires
sending a request to the APIs, waiting for the external server to process, and waiting
for a response.

### Logging

If the generation of the alt text via AI is set, in case of errors, to avoid blocking
the editorial work, the image is loaded anyway but without the alt text being compiled.

When a call to the Azure or OpenAI API fails, a record containing the error message
is saved in a custom database table.
 In this case, the cause of the error can be
seen on the Auto Alt Text -> Error log page.

### External Services

This plugin uses the following external services alternatively:

### OpenAI

Selecting the generation method “OpenAI’s APIs” will use the API services of [OpenAI](https://openai.com/).

This plugin does not collect any information from your OpenAI account. The data 
transmitted to OpenAI mainly consists of the image files uploaded to your website
and the specified prompt.

For accurate information on privacy and conditions of use, please consult the [privacy policy](https://openai.com/policies/privacy-policy)
and [terms and conditions](https://openai.com/) directly on the official website.
It is also advisable to check the costs and usage statistics of the API service 
on the OpenAI website.

### Anthropic Claude

Selecting the generation method “Anthropic’s APIs” will use the API services of 
[Anthropic](https://console.anthropic.com/).

This plugin does not collect any information from your Anthropic Claude account.
The data transmitted to Anthropic Claude mainly consists of the image files uploaded
to your website and the specified prompt.

For accurate information on privacy and conditions of use, please consult the [privacy policy](https://www.anthropic.com/legal/privacy),
[terms and conditions for consumers](https://www.anthropic.com/legal/consumer-terms)
and [terms and conditions for commercial](https://www.anthropic.com/legal/commercial-terms)
directly on the official website. It is also advisable to check the costs and usage
statistics of the API service on the Anthropic website.

### Azure

Selecting the “Azure’s APIs” generation method will use the API services of [Microsoft Azure](https://azure.microsoft.com/en-us/).

This plugin does not collect any information from your Azure account. The data transmitted
to Azure consists mainly of image files uploaded to your website.

For accurate information on privacy and conditions of use, please directly consult
the [privacy policy](https://privacy.microsoft.com/en-us/privacystatement) and [terms and conditions](https://azure.microsoft.com/en-us/support/legal/)
on the official website. It is also advisable to check the costs and usage statistics
of the API service on the Microsoft Azure’s website.

### Encryption Constants

We **strongly recommend** defining the new plugin-specific constants in your `wp-
config.php`:

    ```
    define( 'AAT_ENCRYPTION_KEY',  'a_random_string_of_at_least_64_characters' );
    define( 'AAT_ENCRYPTION_SALT', 'another_random_string_of_at_least_64_characters' );
    ```

You will find these two define(…) lines already generated for you on the Auto Alt
Text » Options page – simply copy & paste them before the `/* That's all, stop editing!
Happy publishing. */` line in your `wp-config.php`.

If you choose not to add them, the plugin will continue to work normally, but it
will fall back to using your WordPress `LOGGED_IN_KEY` / `LOGGED_IN_SALT`, which
may break if those salts are ever changed.

### Disclaimer

Auto Alt Text is a plugin that helps users automatically generate Alt Texts of their
images using AI services such as OpenAI’s ChatGPT or Microsoft Azure.
 Users need
their own API key and must follow the rules set by the AI service they choose.

By using Auto Alt Text, users agree to watch and manage AI-made content and address
any issues or misuse.

AI Engine developer and related parties are not responsible for any problems or 
losses caused by the use of the plugin or AI-generated content.

## Screenshots

 * [[
 * Azure’s APIs method options page
 * [[
 * OpenAI’s APIs method options page
 * [[
 * Title of the article options page
 * [[
 * Title of the attachment options page
 * [[
 * Bulk alt text generation
 * [[
 * Single image alt text generation

## FAQ

### Is it mandatory to use external AI services?

No, but if you want to leverage the capabilities of AI, you must have an Azure or
OpenAI account. Otherwise, you can choose one of the two methods that do not use
AI.

### Which generation method should I choose to obtain an accurate description of the image?

If you wish to obtain the most accurate description possible of the image, you should
use the “OpenAI’s APIs” or “Azure’s APIs” method.

### Why do I see the error “There was a problem with the encryption of your API Key for alt text generation. Please re-enter the key and save”?

This message appears because the plugin was unable to decrypt your stored API Key.
In most cases this happens when the cryptographic “salt” or “key” it originally 
used to encrypt your API Key has changed since you first saved it.

**Common causes**
 – You (or another plugin) have changed the WordPress authentication
salts (`LOGGED_IN_KEY` / `LOGGED_IN_SALT`) in your `wp-config.php` after saving 
the API Key. – You haven’t defined the recommended plugin-specific constants (`AAT_ENCRYPTION_KEY`/`
AAT_ENCRYPTION_SALT`) in your `wp-config.php`, so the plugin fell back to the WordPress
salts.

**How to fix**
 1. Go to **Auto Alt Text » Options** in your WordPress admin. 2.
Re-enter your API Key in the appropriate field and click **Save Changes**. 3. _(
Recommended)_ Prevent this issue in the future by adding these lines **before** 
the `/* That's all, stop editing! Happy publishing. */` comment in your `wp-config.
php`: `define( 'AAT_ENCRYPTION_KEY', 'a_random_string_of_at_least_64_characters');
define( 'AAT_ENCRYPTION_SALT', 'another_random_string_of_at_least_64_characters');

This ensures the plugin uses stable, plugin-specific values for encryption and won’t
break if WordPress salts are ever changed again.

Once you’ve re-entered your API Key (and, if desired, added the constants), hit 
Save Changes — the plugin will re-encrypt your key correctly and the error will 
disappear

## Reviews

![](https://secure.gravatar.com/avatar/72ede23137736cefe254039ca8d71a11aae1d184341f4c2fd63bd6a940a04956?
s=60&d=retro&r=g)

### 󠀁[Nice plugin but button in editor gallery is not working](https://wordpress.org/support/topic/nice-plugin-but-button-in-editor-gallery-is-not-working/)󠁿

 [wriper](https://profiles.wordpress.org/wriper/) June 4, 2025 1 reply

Hi, this plugin is exactly what I needed. Thank you for option to connect own API
keys. Only thing for perfection is that button “in editor” is not working for us.
Only manually uploaded images are texted also button in media library from sidebar
is working but button “in article grid view” media library is doing nothing. It 
would be great if you can check on this as we could text also images that are added
with other plugins like Instant Images that way. Tried to disable all plugins and
theme. Didn’t help Edit: didn’t work also on another hosting

![](https://secure.gravatar.com/avatar/07b4b426ae2d296b4c4e72e56c7c9bf8653f64a06a60ce9cf0397a0bee6c8396?
s=60&d=retro&r=g)

### 󠀁[Awesome but needs queuing](https://wordpress.org/support/topic/awesome-but-needs-queuing/)󠁿

 [harryfear](https://profiles.wordpress.org/harryfear/) April 10, 2025

Awesome, but needs queue system for bulk processing large quantities of existing
media items

![](https://secure.gravatar.com/avatar/5869c67186a5764a868bac6af93061b9cee7a1253f303b0781f1727776c6abc8?
s=60&d=retro&r=g)

### 󠀁[Excelent AI ALT text generator](https://wordpress.org/support/topic/excelent-ai-alt-text-generator/)󠁿

 [chillmen](https://profiles.wordpress.org/chillmen/) March 12, 2025

Simple to use, i’m using with Openai API, very cheap compared to other solutions.
Thanks a lot for creating this plugin.If you have time, adding caption generation,
would be great.

![](https://secure.gravatar.com/avatar/b3f6109182e941e8a898e763f345d8dc3a937efdc32cced8ce45260683d3bc17?
s=60&d=retro&r=g)

### 󠀁[Perfect Solution for Missing ALT Text](https://wordpress.org/support/topic/perfect-solution-for-missing-alt-text/)󠁿

 [Pwoli](https://profiles.wordpress.org/pwoli/) February 9, 2025

Realy love it. Thanks for making this great plugin!

![](https://secure.gravatar.com/avatar/0125a077d067147682fab3007fa8984a7dc265dc103bffcb96008dd98228615d?
s=60&d=retro&r=g)

### 󠀁[Love the plugin](https://wordpress.org/support/topic/love-the-plugin-121/)󠁿

 [piracymoney](https://profiles.wordpress.org/piracymoney/) May 1, 2024 2 replies

I just wish it could tag existing images that I have in my media library that don’t
have alt texts, I have about 1,200 that I would need to manually reupload 🙁

![](https://secure.gravatar.com/avatar/5dccf34710d4069ef959fbb87ff1ffcf88f530c6a3691275938cbdbc5c5717b7?
s=60&d=retro&r=g)

### 󠀁[Fast and simple](https://wordpress.org/support/topic/fast-and-simple-61/)󠁿

 [](https://profiles.wordpress.org/web-man/) March 12, 2024

Easy plugin to add the alt text to our images. You only need to add the API to openAI(
or azure). Thank you!

 [ Read all 6 reviews ](https://wordpress.org/support/plugin/auto-alt-text/reviews/)

## Contributors & Developers

“Auto Alt Text” is open source software. The following people have contributed to
this plugin.

Contributors

 *   [ Valerio Monti ](https://profiles.wordpress.org/valeriomonti/)

[Translate “Auto Alt Text” into your language.](https://translate.wordpress.org/projects/wp-plugins/auto-alt-text)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/auto-alt-text/), check
out the [SVN repository](https://plugins.svn.wordpress.org/auto-alt-text/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/auto-alt-text/) 
by [RSS](https://plugins.trac.wordpress.org/log/auto-alt-text/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.8.0

 * Implement WP CLI commands for generating alt text

#### 2.7.0

 * Migrate to the Responses API from the Chat Completion API for OpenAI
 * Remove o1 Mini deprecated model

#### 2.6.2

 * Replace hardcoded Openai model with the one selected from the user
 * Update phpunit
 * Update Vite

#### 2.6.1

 * Avoid to truncate alt text too long

#### 2.6.0

 * Implement SOLID principles
 * Use design patterns
 * Implement tests
 * Preserve Media Library pagination when redirecting after bulk action

#### 2.5.3

 * Protect the plugin from Cross-Site Request Forgery attacks

#### 2.5.2

 * Enable the use of OpenAI’s GPT-5, GPT-5 Mini and GPT-5 nano models.

#### 2.5.1

 * Replace a deprecated Azure Computer Vision api version.

#### 2.5.0

 * Implement the Anthropic API as an alternative for generating alt text.

#### 2.4.2

 * Modify documentation and build again the assets

#### 2.4.1

 * Fixed: Alt text now correctly persists when generated from both the post media
   overlay and the main Media Library.

#### 2.4.0

 * Introduce two new plugin-specific constants, `AATXT_ENCRYPTION_KEY` and `AATXT_ENCRYPTION_SALT`,
   allowing API keys to be encrypted independently of WordPress’s own salts.
 * Implement automatic migration of existing encrypted API keys: on upgrade, keys
   encrypted with the old WP salts are decrypted (if possible) and re-encrypted 
   with the new plugin key.
 * Add an optional info notice on the Auto Alt Text options page showing the ready-
   to-copy `define()` statements for `wp-config.php`.
 * Maintain full backward-compatibility: if the new constants are not defined, the
   plugin continues to use the WordPress `LOGGED_IN_KEY`/`LOGGED_IN_SALT` fallback
   without interruption.

#### 2.3.4

 * Displays an error message in the administration area if the WordPress salt keys
   were changed after the OpenAI API key was set. The message asks the user to enter
   the OpenAI API key again.
 * Update npm packages

#### 2.3.3

 * Fix a return type error in the alt text generation

#### 2.3.2

 * Avoid generating alt text for not supported mime types
 * Hide the ‘Generate Alt Text’ button in media library for unsupported mime types
 * Update npm packages

#### 2.3.1

 * Tested up to WordPress 6.7.2

#### 2.3.0

 * Preserves alt tags already present in images by preventing them from being overwritten
   by those generated by the plugin
 * Update npm packages

#### 2.2.0

 * Allow users to select the preferred Openai model for generating alt text

#### 2.1.0

 * Allow users to generate the alt text for each individual image in the media library

#### 2.0.0

 * Set a maximum timeout of 90 seconds for OpenAI requests
 * Implement the gpt-4o model for generating alt text
 * Implement gpt-4-turbo template for fallback alt text generation
 * Remove gpt-4 and gpt-3.5 templates as fallback options

#### 1.3.0

 * Implement bulk alt text generation for images already in the media library
 * Update Vite package
 * Implement github actions for automatic release

#### 1.2.4

 * Code refactoring
 * DB security improvements

#### 1.2.3

 * Code refactoring

#### 1.2.2

 * Add Database log management
 * Escape all output
 * Add AATXT_ prefix
 * Update Vite package
 * Remove file log management

#### 1.0.0

 * Plugin released

## Meta

 *  Version **2.8.0**
 *  Last updated **4 weeks ago**
 *  Active installations **3,000+**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **6.9.0**
 *  PHP version ** 7.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/auto-alt-text/)
 * Tags
 * [accessibility](https://az-tr.wordpress.org/plugins/tags/accessibility/)[alt tag](https://az-tr.wordpress.org/plugins/tags/alt-tag/)
   [Alt Text](https://az-tr.wordpress.org/plugins/tags/alt-text/)[openai](https://az-tr.wordpress.org/plugins/tags/openai/)
   [seo](https://az-tr.wordpress.org/plugins/tags/seo/)
 *  [Advanced View](https://az-tr.wordpress.org/plugins/auto-alt-text/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  6 5-star reviews     ](https://wordpress.org/support/plugin/auto-alt-text/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/auto-alt-text/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/auto-alt-text/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/auto-alt-text/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/auto-alt-text/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/auto-alt-text/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/auto-alt-text/reviews/)

## Contributors

 *   [ Valerio Monti ](https://profiles.wordpress.org/valeriomonti/)

## Support

Issues resolved in last two months:

     0 out of 1

 [View support forum](https://wordpress.org/support/plugin/auto-alt-text/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://ko-fi.com/valeriomonti)