Adds AI-generated alt text to upload collections in Payload. It provides a Generate button on each image, a bulk admin page in the sidebar, and an optional automatic mode on upload. It calls the external Alt Text Generator service from the server using an API key and credits, and requires Payload 3.92 or newer and Node.js 20.9 or newer.
Generate SEO-friendly alt text for the images in your Payload CMS media library: one at a time, in bulk, or automatically on upload.
Installation
npm i @balt1794/payload-plugin-alt-text-generator0
Stars
0
Forks
0
Open Issues
1 months ago
Last Updated
15
Weekly Downloads
v1.0.0
npm Version
146.5 KB
Unpacked Size
0
Dependencies
00 since Oct 25
| Date | Stars |
|---|---|
| Dec 6, 2026 | 0 |
| Dec 5, 2026 | 0 |
| Dec 4, 2026 | 0 |
| Dec 3, 2026 | 0 |
| Dec 2, 2026 | 0 |
| Dec 1, 2026 | 0 |
| Nov 30, 2026 | 0 |
| Nov 29, 2026 | 0 |
| Nov 28, 2026 | 0 |
| Nov 27, 2026 | 0 |
| Nov 26, 2026 | 0 |
| Nov 25, 2026 | 0 |
| Nov 24, 2026 | 0 |
| Nov 23, 2026 | 0 |
| Nov 22, 2026 | 0 |
| Nov 21, 2026 | 0 |
| Nov 20, 2026 | 0 |
| Nov 19, 2026 | 0 |
| Nov 18, 2026 | 0 |
| Nov 17, 2026 | 0 |
| Nov 16, 2026 | 0 |
| Nov 15, 2026 | 0 |
| Nov 14, 2026 | 0 |
| Nov 13, 2026 | 0 |
| Nov 12, 2026 | 0 |
| Nov 11, 2026 | 0 |
| Nov 10, 2026 | 0 |
| Nov 9, 2026 | 0 |
| Nov 8, 2026 | 0 |
| Nov 7, 2026 | 0 |
| Nov 6, 2026 | 0 |
| Nov 5, 2026 | 0 |
| Nov 4, 2026 | 0 |
| Nov 3, 2026 | 0 |
| Nov 2, 2026 | 0 |
| Nov 1, 2026 | 0 |
| Oct 31, 2026 | 0 |
| Oct 30, 2026 | 0 |
| Oct 29, 2026 | 0 |
| Oct 28, 2026 | 0 |
| Oct 27, 2026 | 0 |
| Oct 26, 2026 | 0 |
| Oct 25, 2026 | 0 |
15+15 since Oct 31
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 15 |
| Dec 5, 2026 | 14 |
| Dec 4, 2026 | 14 |
| Dec 3, 2026 | 19 |
| Dec 2, 2026 | 18 |
| Dec 1, 2026 | 15 |
| Nov 30, 2026 | 15 |
| Nov 29, 2026 | 13 |
| Nov 28, 2026 | 15 |
| Nov 27, 2026 | 15 |
| Nov 26, 2026 | 9 |
| Nov 25, 2026 | 8 |
| Nov 24, 2026 | 10 |
| Nov 23, 2026 | 10 |
| Nov 22, 2026 | 11 |
| Nov 21, 2026 | 15 |
| Nov 20, 2026 | 20 |
| Nov 19, 2026 | 24 |
| Nov 18, 2026 | 28 |
| Nov 17, 2026 | 28 |
| Nov 16, 2026 | 32 |
| Nov 15, 2026 | 34 |
| Nov 14, 2026 | 30 |
| Nov 13, 2026 | 45 |
| Nov 12, 2026 | 44 |
| Nov 11, 2026 | 54 |
| Nov 10, 2026 | 55 |
| Nov 9, 2026 | 77 |
| Nov 8, 2026 | 375 |
| Nov 7, 2026 | 372 |
| Nov 6, 2026 | 351 |
| Nov 5, 2026 | 348 |
| Nov 4, 2026 | 334 |
| Nov 3, 2026 | 330 |
| Nov 2, 2026 | 303 |
| Nov 1, 2026 | 0 |
| Oct 31, 2026 | 0 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1439985828-root)<a href="https://payloaddirectory.dev/plugins/1439985828-root"><img src="https://payloaddirectory.dev/badge/1439985828-root.svg" alt="Payload Directory"></a>README
Write SEO-friendly alt text for the images in your Payload media library. Generate it for one image, for a selection, for every image that is missing it, or automatically when an image is uploaded. 131 languages.

npm install @balt1794/payload-plugin-alt-text-generator
Add the plugin to payload.config.ts and list the upload collections that hold your images:
import { buildConfig } from 'payload'
import { altTextGenerator } from '@balt1794/payload-plugin-alt-text-generator'
export default buildConfig({
// ...
plugins: [
altTextGenerator({
collections: ['media'],
autoGenerate: true, // optional, can also be switched in the admin
}),
],
})
Put your key in .env:
ALT_TEXT_GENERATOR_API_KEY=your-key-here
Then run:
npx payload generate:importmap
The import map tells Payload where to find the plugin's admin parts, so run it once after installing and restart your dev server.
The plugin adds one small hidden settings table (it stores the auto-generate switch and the language you choose on the Alt Text Generator page). If your collection does not already have an alt text field, the plugin adds that too.
npx payload migrate:create
npx payload migrate
The plugin shows up in three places, so you can always tell it is installed:

Open the image, click Generate alt text, and save. With automatic mode on, a new image gets its alt text when you save it, so there is no need to click anything.

Generate all missing skips images that already have alt text. Tick an image to generate it anyway, or turn on Overwrite images that already have alt text.

| Option | Default | What it does |
|---|---|---|
collections | required | Upload collections to add alt text to. |
apiKey | ALT_TEXT_GENERATOR_API_KEY | Your API key. Prefer the environment variable. |
autoGenerate | false | Starting value for automatic mode. Whatever an admin saves on the bulk page takes over. |
language | english | Starting language. Whatever an admin saves takes over. |
altField | alt | The field that holds the alt text. It is created if the collection does not have it. |
access | any signed-in user | Decides who may generate alt text, check credits and change the settings. |
disabled | false | Turns the plugin off but keeps its fields so your database stays consistent. |
Each generation uses one credit. If your users collection includes people who are not staff, such as customers or members, limit the plugin to your team:
altTextGenerator({
collections: ['media'],
access: ({ req }) => req.user?.role === 'admin',
})
If Payload localization is on, the bulk page shows a Locale dropdown instead of a language dropdown. The alt text is generated in the language of the locale (for example es writes Spanish) and saved into that locale. Make your alt field localized: true to keep a separate alt text per locale.
When you generate alt text, a resized copy of the image (JPEG, up to 1024 px) and your API key are sent from your Payload server to alttextgeneratorai.com. Images are not stored by the plugin. Nothing is sent from the browser.
| What you see | What to do |
|---|---|
| No Alt Text Generator link in the sidebar | Run npx payload generate:importmap and restart. |
| "No API key" | Set ALT_TEXT_GENERATOR_API_KEY in .env and restart. |
| "Invalid API key" | Copy the key again from your dashboard. |
| "No credits left on this API key" | Add credits at alttextgeneratorai.com. |
| "You do not have permission to do this" | Your access function returned false for this user. |
| Database error about a missing table or column | Run the migration steps above. |
[email protected], or open an issue on GitHub.
MIT © Bryam Loaiza
writealt native cms
Bulk AI alt text generation for images in the Payload admin, with optional WebP or AVIF file optimization
350v?
payload ai manager
Generate product titles, descriptions, attributes and translations with Claude, ChatGPT, Gemini or Kimi
7022/wk1v3
payload agent
AI chat agent that queries and manages Payload content from Telegram, Slack, WhatsApp and other chat platforms
5774/wk17v3
payload ai plugin
AI assistant in the Payload admin with multiple providers, CMS mentions and signed action proposals
54301/wk4v3
payload plugin ai chat
Adds ChatGPT-style chat to Payload collections using OpenAI models
3312/wk15v1
payload plugin ai completions
Generate field content in the Payload admin with OpenAI completions using configurable per-field prompts
2812/wk8v1