Alt Text Generator Strapi Plugin

Generate SEO-optimized alt text for the images in your Strapi Media Library, in bulk or automatically on upload

Alt Text Generator AI writes SEO-friendly alt text for your images with AI. The Strapi plugin adds a page to your Strapi admin that scans your Media Library, writes alt text for the images that are missing it and saves it in Strapi's own Alternative text field. It can also write it for every new upload. This step-by-step guide shows how to install and use it.

Better alt text helps your site's accessibility and image SEO, and saves hours of writing descriptions by hand. It works on the free Community edition of Strapi 5, with no license needed.

1

Install the Plugin

  1. In your Strapi project, run npm install @balt1794/strapi-plugin-alt-text-generator
  2. Get your API key from the dashboard
  3. Add it to the .env file of your Strapi project as ALT_TEXT_GENERATOR_API_KEY
  4. Restart Strapi. The plugin turns itself on, so there is nothing to add to your config

💡Needs Strapi 5. Your API key stays on your server and never reaches the browser.

npm install @balt1794/strapi-plugin-alt-text-generator

# .env
ALT_TEXT_GENERATOR_API_KEY=your-key-here
2

Add the Key in Production

  1. A .env file is for local work. On your live server, set ALT_TEXT_GENERATOR_API_KEY as an environment variable
  2. Strapi Cloud: Settings, then Variables
  3. Railway, Render, Fly.io, Heroku: the environment variables page of your service
  4. Redeploy or restart, then open the plugin page to check

💡Never commit the key to Git. Without a key, the plugin page shows an Add your API key notice.

// config/plugins.ts (optional)
export default ({ env }) => ({
  'alt-text-generator': {
    enabled: true,
    config: {
      apiKey: env('ALT_TEXT_GENERATOR_API_KEY'),
      autoGenerate: true, // optional
      language: 'english', // optional
    },
  },
});
3

Find the Plugin in the Admin

  1. Open your Strapi admin and sign in
  2. A new Alt Text Generator AI link with an image icon appears in the left menu
  3. Open it. The page shows your language, your credits and every image in the Media Library
Alt Text Generator AI page in the Strapi admin listing images that are missing alt text
4

Generate Alt Text for Many Images

  1. Missing lists the images with no alt text. All shows everything. Tick the ones you want, or leave them all unticked
  2. Click Generate selected or Generate all missing. Each image uses 1 credit
  3. Read the results and edit any text you want to change. You can also click Generate or Regenerate on a single image
  4. Click Save changes to write them all to the Media Library

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

Generated alt text for each image on the Strapi bulk page, ready to save
5

Write Alt Text on Upload

  1. On the plugin page, tick Write alt text automatically when an image is uploaded, or set autoGenerate: true
  2. New uploads get alt text as soon as they are saved. Replacing an image's file writes new alt text for the new picture
  3. Open any image in the Media Library. The text is in Strapi's Alternative text field, ready to use as the alt of your images

💡Images that already have alt text are never overwritten on upload.

Generated text in the Alternative text field of an image in the Strapi Media Library
6

Choose the Language

  1. Pick the language of the alt text from the Language list on the plugin page, from English to Zulu
  2. The choice is saved, so it also applies to automatic uploads
  3. Your credits are shown on the same page. Each generation uses one credit
GET /api/upload/files/10

{
  "name": "swiss-village.jpg",
  "alternativeText": "Scenic Alpine village with mountain views..."
}
✓

Bulk Page

A menu page scans your Media Library, shows thumbnails and lists the images missing alt text. Tick the ones you want and save them all at once.

✓

Automatic on Upload

Turn on one checkbox and new uploads get alt text when they are saved. Replace an image and the alt text is rewritten for the new one.

✓

Works on Community

No Strapi license or AI plan needed. The text goes into Strapi's own Alternative text field.

✓

131 Languages

Choose the language of the alt text, and write it for your international audience.

✓

Your Key Stays on Your Server

The API key is only used by the plugin's server code. The browser never sees it.

✓

Free Credits

Sign up to get free credits and test alt text generation on your own images.

🔑

Activate Your Plugin

Install the plugin, add your API key to .env and restart Strapi.