PluginProbe
Auto Alt Text / 2.8.1
Auto Alt Text v2.8.1
3.0.3 2.8.2 1.3.1 1.3.2 2.0.0 2.1.0 2.1.1 2.2.0 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.5.0 2.5.1 2.5.2 2.5.3 2.6.0 2.6.1 2.7.0 2.8.0 2.8.1 All 28 releases
auto-alt-text / readme.txt

readme.txt in Auto Alt Text 2.8.1, at readme.txt

298 lines 13.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 === Auto Alt Text ===
2 Contributors: valeriomonti
3 Donate link: https://ko-fi.com/valeriomonti
4 Tags: alt text, alt tag, accessibility, openai, seo
5 Requires at least: 6.0
6 Tested up to: 6.9.0
7 Stable tag: 2.8.1
8 Requires PHP: 7.4
9 License: GPLv3
10 License URI: http://www.gnu.org/licenses/gpl.html
11
12 This plugin allows you to automatically generate an Alt Text for images uploaded into the media library via AI.
13
14 == Description ==
15
16 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.
17
18 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.
19
20 Clearly, using artificial intelligence will allow for a more accurate and useful alt texts.
21
22 ## Features
23 ___
24 This plugin allows you to generate alt texts in the following ways:
25 - using Openai APIs (GPT-4o, GPT-4o Mini, o1 Mini)
26 - using Anthropic Claude API
27 - using Azure APIs for computational vision;
28 - recovering the title of the image
29 - recovering the title of the article in which the image is uploaded
30
31
32 = Getting Started =
33 After installing the plugin, click on the 'Auto Alt Text' menu item.
34
35 ## Choice of Generation Method
36 Select the Generation Method you prefer
37
38 ### OpenAI's APIs
39 In your OpenAI account, retrieve the following data to enter on the options page:
40 - API Key
41
42 Choose the model you want to use for generating the alt text.
43 Enter a prompt for generating the alt text according to your needs.
44
45 ### Claude Anthropic's APIs
46 In your Anthropic account, retrieve the following data to enter on the options page:
47 - API Key
48
49 Choose the model you want to use for generating the alt text.
50 Enter a prompt for generating the alt text according to your needs.
51
52
53 ### Azure's APIs
54 On your Azure account, create a Computer Vision instance and retrieve the following data to enter on the options page:
55 - Computer Vision API Key
56 - Computer Vision Endpoint
57
58 If you want to generate an alt text in English, save the options without filling in any other fields.
59
60 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:
61 - Translator Instance API Key
62 - Translator Instance Endpoint
63 - Translator Instance Region
64
65 After entering this data, save the options.
66
67 Select the desired language and save the options again.
68
69 ### Title of the article
70 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.
71
72 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.
73
74 ### Title of the attachment
75 For this generation method, there are no options to set as the alt text will be generated by copying the title of the image.
76
77 ## Functioning
78 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.
79
80 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.)
81
82 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.
83
84 ### WP-CLI
85 If you prefer generating alt text in batch (e.g., to avoid processing in the Media Library UI), you can use WP-CLI.
86
87 Generate alt text for a list of attachment IDs:
88
89 `wp auto-alt-text generate --ids=123,456,789`
90
91 Process all image attachments in batches:
92
93 `wp auto-alt-text generate --all --limit=200 --offset=0`
94 `wp auto-alt-text generate --all --limit=200 --offset=200`
95
96 Dry run (no metadata updates):
97
98 `wp auto-alt-text generate --ids=123,456 --dry-run`
99
100 Force overwrite of existing alt text (even if “Keep existing alt text” is enabled):
101
102 `wp auto-alt-text generate --all --limit=200 --offset=0 --force`
103
104 **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.
105
106 ### Logging
107 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.
108
109 When a call to the Azure or OpenAI API fails, a record containing the error message is saved in a custom database table.
110 In this case, the cause of the error can be seen on the Auto Alt Text -> Error log page.
111
112 ## External Services
113 This plugin uses the following external services alternatively:
114
115 ### OpenAI
116 Selecting the generation method "OpenAI's APIs" will use the API services of [OpenAI](https://openai.com/).
117
118 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.
119
120 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.
121
122 ### Anthropic Claude
123 Selecting the generation method "Anthropic's APIs" will use the API services of [Anthropic](https://console.anthropic.com/).
124
125 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.
126
127 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.
128
129 ### Azure
130 Selecting the "Azure's APIs" generation method will use the API services of [Microsoft Azure](https://azure.microsoft.com/en-us/).
131
132 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.
133
134 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.
135
136 ## Encryption Constants
137
138 We **strongly recommend** defining the new plugin-specific constants in your `wp-config.php`:
139
140 `define( 'AAT_ENCRYPTION_KEY', 'a_random_string_of_at_least_64_characters' );`
141 `define( 'AAT_ENCRYPTION_SALT', 'another_random_string_of_at_least_64_characters' );`
142
143 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`.
144
145 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.
146
147 ## Disclaimer
148 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.
149 Users need their own API key and must follow the rules set by the AI service they choose.
150
151 By using Auto Alt Text, users agree to watch and manage AI-made content and address any issues or misuse.
152
153 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.
154
155
156 == Frequently Asked Questions ==
157
158 = Is it mandatory to use external AI services? =
159 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.
160
161 = Which generation method should I choose to obtain an accurate description of the image? =
162 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.
163
164 = 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”? =
165
166 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.
167
168 **Common causes**
169 - 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.
170 - 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.
171
172 **How to fix**
173 1. Go to **Auto Alt Text » Options** in your WordPress admin.
174 2. Re-enter your API Key in the appropriate field and click **Save Changes**.
175 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`:
176 ```
177 define( 'AAT_ENCRYPTION_KEY', 'a_random_string_of_at_least_64_characters' );
178 define( 'AAT_ENCRYPTION_SALT', 'another_random_string_of_at_least_64_characters' );
179 ```
180
181 This ensures the plugin uses stable, plugin-specific values for encryption and won’t break if WordPress salts are ever changed again.
182
183 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
184
185 == Screenshots ==
186
187 1. Azure's APIs method options page
188 2. OpenAI's APIs method options page
189 3. Title of the article options page
190 4. Title of the attachment options page
191 5. Bulk alt text generation
192 6. Single image alt text generation
193
194 == Changelog ==
195 = 2.8.1 =
196 - Update available Claude models
197
198 = 2.8.0 =
199 - Implement WP CLI commands for generating alt text
200
201 = 2.7.0 =
202 - Migrate to the Responses API from the Chat Completion API for OpenAI
203 - Remove o1 Mini deprecated model
204
205 = 2.6.2 =
206 - Replace hardcoded Openai model with the one selected from the user
207 - Update phpunit
208 - Update Vite
209
210 = 2.6.1 =
211 - Avoid to truncate alt text too long
212
213 = 2.6.0 =
214 - Implement SOLID principles
215 - Use design patterns
216 - Implement tests
217 - Preserve Media Library pagination when redirecting after bulk action
218
219 = 2.5.3 =
220 - Protect the plugin from Cross-Site Request Forgery attacks
221
222 = 2.5.2 =
223 - Enable the use of OpenAI's GPT-5, GPT-5 Mini and GPT-5 nano models.
224
225 = 2.5.1 =
226 - Replace a deprecated Azure Computer Vision api version.
227
228 = 2.5.0 =
229 - Implement the Anthropic API as an alternative for generating alt text.
230
231 = 2.4.2 =
232 - Modify documentation and build again the assets
233
234 = 2.4.1 =
235 - Fixed: Alt text now correctly persists when generated from both the post media overlay and the main Media Library.
236
237 = 2.4.0 =
238 - 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.
239 - 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.
240 - Add an optional info notice on the Auto Alt Text options page showing the ready-to-copy `define()` statements for `wp-config.php`.
241 - 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.
242
243 = 2.3.4 =
244 - 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.
245 - Update npm packages
246
247 = 2.3.3 =
248 - Fix a return type error in the alt text generation
249
250 = 2.3.2 =
251 - Avoid generating alt text for not supported mime types
252 - Hide the 'Generate Alt Text' button in media library for unsupported mime types
253 - Update npm packages
254
255 = 2.3.1 =
256 - Tested up to WordPress 6.7.2
257
258 = 2.3.0 =
259 - Preserves alt tags already present in images by preventing them from being overwritten by those generated by the plugin
260 - Update npm packages
261
262 = 2.2.0 =
263 - Allow users to select the preferred Openai model for generating alt text
264
265 = 2.1.0 =
266 - Allow users to generate the alt text for each individual image in the media library
267
268 = 2.0.0 =
269 - Set a maximum timeout of 90 seconds for OpenAI requests
270 - Implement the gpt-4o model for generating alt text
271 - Implement gpt-4-turbo template for fallback alt text generation
272 - Remove gpt-4 and gpt-3.5 templates as fallback options
273
274 = 1.3.0 =
275 - Implement bulk alt text generation for images already in the media library
276 - Update Vite package
277 - Implement github actions for automatic release
278
279 = 1.2.4 =
280 - Code refactoring
281 - DB security improvements
282
283 = 1.2.3 =
284 - Code refactoring
285
286 = 1.2.2 =
287 - Add Database log management
288 - Escape all output
289 - Add AATXT_ prefix
290 - Update Vite package
291 - Remove file log management
292
293 = 1.0.0 =
294 - Plugin released
295
296 == Upgrade Notice ==
297 - Plugin released
298