Skip to main content

Alt Text Generator AI for Wagtail

Alt Text Generator logo

Write SEO-friendly alt text for the images in your Wagtail library. Generate it for one image or in bulk, in 131 languages.

Get a free API key

What you get

  • A bulk page in the admin. Alt Text Generator AI sits in the main menu. It lists your images with a preview, shows the ones with no description, and writes it for all of them or only the ones you tick.
  • Automatic on upload. New images get their alt text written as you upload them, and every image has a Generate Alt Text button next to its Description.
  • Review before saving. Edit any text, then save everything at once. The text goes into the image's Description, which Wagtail uses as the default alt text when you insert the image in rich text or an image block.
  • Nothing is overwritten by accident. Generate all missing skips images that already have a description. Tick an image to write a new one for it, and it is only saved when you click Save changes.
  • 131 languages for the text, including English, Spanish, French, German, Italian, Portuguese, Dutch, Russian, Chinese, Japanese, Korean, Arabic and Hindi.
  • Credits shown on the page. One credit writes alt text for one image. New accounts get free credits.
  • Your key stays on your server. The API key is only used by Django and never reaches the browser.
  • Respects Wagtail permissions. Editors who may change images can generate and save. Only superusers can change the API key.

Requirements

  • Wagtail 6.3 LTS or newer (the image Description field was added in 6.3)
  • Python 3.9 or newer
  • An Alt Text Generator API key (get one free)

Install

pip install wagtail-alt-text-generator-ai

Add the app to INSTALLED_APPS and run the migration:

INSTALLED_APPS = [
    # ...
    "wagtail_alt_text_generator_ai",
    # ...
]
python manage.py migrate

Open Alt Text Generator AI in the admin menu, paste your API key and click Save key.

Use it

  1. Open Alt Text Generator AI. It lists your images and shows your credits.
  2. Missing shows the images with no description. All shows everything.
  3. Tick the images you want, or leave them all unticked.
  4. Click Generate selected or Generate all missing. Each image uses 1 credit.
  5. Read the results, change anything you like, then click Save changes.

Settings

All settings are optional.

Setting What it does
ALT_TEXT_GENERATOR_API_KEY API key to use when none was saved in the admin. A key saved in the admin takes priority.
ALT_TEXT_GENERATOR_AUTO_GENERATE Write alt text automatically for new uploads. On by default once an API key is set. Set to False to turn it off.
ALT_TEXT_GENERATOR_LANGUAGE Default language, for example "german". By default it follows LANGUAGE_CODE.

Good to know

  • Images are shrunk to 1024 px on the long side before they are sent.
  • Descriptions are limited to 255 characters by Wagtail. Longer text is shortened with an ellipsis, and you are told when that happens.
  • SVG images are skipped, because they cannot be described from their pixels.
  • Generating is done a few images at a time, so a large library can take a few minutes. You can stop at any point and keep what was written.

Development

pip install -e .
python manage.py test wagtail_alt_text_generator_ai

License

MIT. See LICENSE.

Metadata

Release files for wagtail-alt-text-generator-ai 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtail-alt-text-generator-ai 1.0.1
File Size Uploaded Provenance Actions
wagtail_alt_text_generator_ai-1.0.1.tar.gz 37.1 kB Without provenance Details for wagtail_alt_text_generator_ai-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-alt-text-generator-ai 1.0.1
File Interpreter ABI Platform Actions
wagtail_alt_text_generator_ai-1.0.1-py3-none-any.whl Python 3 none any Details for wagtail_alt_text_generator_ai-1.0.1-py3-none-any.whl

Total release size: 75.5 kB

Release files / wagtail_alt_text_generator_ai-1.0.1.tar.gz

Download URL wagtail_alt_text_generator_ai-1.0.1.tar.gz
Size 37.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d65bc425e7a5431ce9b6e385ae49841c71e9c2174644c8b0bfd79a2de1b13f36
BLAKE2b-256 checksum
How to use checksums
eddc4de779fa20081cfd7e42f9a986d9a5c9f5ddb2d0c838b9ac09344c3da5fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / wagtail_alt_text_generator_ai-1.0.1-py3-none-any.whl

Download URL wagtail_alt_text_generator_ai-1.0.1-py3-none-any.whl
Size 38.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49f69eb85c71869b0e372b0c3ecf013e871eb675a4bbf86b5a49f80fbc114877
BLAKE2b-256 checksum
How to use checksums
1e3653c68de69fab80b41e021de627524bbcb736ea0d9eea44e4b5fb2be69b33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for wagtail-alt-text-generator-ai 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page