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, for a selection or for every image that is missing it, review it, and save. 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.
  • 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.0

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.0
File Size Uploaded Provenance Actions
wagtail_alt_text_generator_ai-1.0.0.tar.gz 36.8 kB Without provenance Details for wagtail_alt_text_generator_ai-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 75.1 kB

Release files / wagtail_alt_text_generator_ai-1.0.0.tar.gz

Download URL wagtail_alt_text_generator_ai-1.0.0.tar.gz
Size 36.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fae32b02e8f51b06e1130e24c80cbf37211a2c7f802605d6cfb529fea240feb5
BLAKE2b-256 checksum
How to use checksums
93c36d224ce6a43030ebaa13c78a34492d5e9f5e08c6680b4a934084b9f30d41
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.0-py3-none-any.whl

Download URL wagtail_alt_text_generator_ai-1.0.0-py3-none-any.whl
Size 38.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06fb1f131298f9841bb08308a5dcf3c2c3612770e06ea2de2024163e00946f43
BLAKE2b-256 checksum
How to use checksums
da0891dcd8ccd49cacd281c3605d199bfb7e9276b1a78a5f6bb054ac7ad2f1aa
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.0

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.0 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