Alt Text Generator Wagtail Package

Generate SEO-optimized alt text for the images in your Wagtail library, in bulk and in 131 languages

Alt Text Generator AI writes SEO-friendly alt text for your images with AI. The Wagtail package adds a page to the admin menu that shows your images with a preview, finds the ones with no description and writes alt text for one image, a selection or all of them. You review the text, change anything you like and save it into the image's Description, which Wagtail uses as the default alt text. 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 Wagtail 6.3 and newer, with no other package needed.

1

Install the Package

  1. Install it with pip, using the command shown here. You can also find it on PyPI, and the source is on GitHub
  2. Add wagtail_alt_text_generator_ai to INSTALLED_APPS in your settings
  3. Run python manage.py migrate, then sign in to the Wagtail admin and open Alt Text Generator AI in the menu

💡Works with Wagtail 6.3 and newer. Your API key stays on your server and never reaches the browser.

pip install wagtail-alt-text-generator-ai

# settings.py
INSTALLED_APPS = [
    # ...
    "wagtail_alt_text_generator_ai",
]

python manage.py migrate
2

Add Your API Key

  1. Get your API key from the dashboard
  2. Paste the key into API key and click Save key
  3. Your credits show at the top of the page

💡Only superusers can change the key. To set it in a deployment, add ALT_TEXT_GENERATOR_API_KEY to your Django settings.

Alt Text Generator AI page in the Wagtail admin with the API key field
3

Find Your Images

  1. The page lists your images with a preview and shows your credits
  2. Missing lists the images that have no description. All shows everything, and you can search by title
  3. Pick the language of the alt text from the list, from English to Zulu
Alt Text Generator AI page in the Wagtail admin listing images that are missing alt text
4

Generate Alt Text

  1. Tick the images you want, or use Select all
  2. Click Generate selected or Generate all missing. Each image uses 1 credit. You can also click Generate on a single image
  3. Read the results and edit any text you want to change
  4. Click Save changes to save them all at once

💡Generate all missing skips images that already have a description. Tick an image to generate it anyway.

Generated alt text for each image in the Wagtail admin, ready to save
5

Use It on Your Site

  1. The text is saved in the Description of the image, which Wagtail uses as the default alt text wherever the image is shown
  2. Open any image to see it. A Generate Alt Text button sits beside the Description for writing one description on the spot
  3. New uploads get their alt text written for them, so the Description is already filled in when you add an image

💡To turn off automatic alt text on upload, set ALT_TEXT_GENERATOR_AUTO_GENERATE = False in your settings.

The Description of a Wagtail image filled in by Alt Text Generator AI
{% load wagtailimages_tags %}

{% image page.photo width-800 %}
✓

Bulk Page in the Admin

A page in the admin menu shows the images of your library with a preview and lists the ones missing alt text. Tick the ones you want and save them all at once.

✓

Saved in the Description

The text goes into the Description of each image, which Wagtail uses as the default alt text. Nothing else to set up in your templates.

✓

Automatic on Upload

New images get their alt text written as you upload them, and you can generate it again from the image at any time.

✓

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 Django. The browser never sees it, and editors follow your Wagtail permissions.

✓

Free Credits

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

🔑

Activate Your Package

Install the package, then add your API key on the Alt Text Generator AI page.