Skip to main content

interaktiv.alttextgenerator

interaktiv.alttextgenerator CI

Generate alternative texts for images.

This add-on helps editors provide meaningful alt texts for images using AI, improving both accessibility and SEO. By ensuring that all images have descriptive alternative texts, the website becomes more usable for people using assistive technologies and more discoverable by search engines.

Prerequisites

Tested for Plone 6.0, 6.1 and 6.2 on Python 3.10 to 3.13.

This add-on requires interaktiv.aiclient for its AI capabilities and interaktiv.alttexts to provide the alt text behaviour.

Currently, this add-on only works out of the box with Volto. Therefore, you should also install the according Volto plugin volto-alttextgenerator.

Features

Screenshot of the Alt Text Generator controlpanel

In the controlpanel, you may configure the

  • system prompt
  • user prompt
  • batch size for migrations
  • allowed image types
  • blacklisted paths

Remember to configure the AI client inside its own controlpanel as well, since otherwise the generation won't work. Once you configured everything, you're all set.

To verify that the add-on works as intended, upload an image either from the toolbar directly or inside an image block. Toasts visually support uploads from image blocks, whereas uploads from the toolbar are silent.

The generated alt text can look like this:

Sample Image Image by Drosera74 via Pixabay

Iridescent blue and green hummingbird hovering with outstretched wings as it feeds from a bright purple flower against a soft green leafy background. (OpenAI: GPT-5.1, 2025-12-15)

The alt text is generated by AI and includes the model used and the generation date at the end. This metadata is appended only for AI-generated alt texts, which can be identified via the corresponding checkbox in the image’s schema. If the alt text is manually edited, the checkbox is automatically disabled to indicate that the alt text is no longer AI-generated.

Language

All alt texts are generated in the site's language. This behaviour is specified in the default user prompt. If you specify {language} inside your user prompt, it will be replaced with the site language internally. If you wish to use a specific language for the alt texts, you can leave out {language} and specify your own language directly inside the user prompt.

Blacklisting paths

To blacklist a path, you can specify a glob pattern. For every request, the image path is matched against the specified patterns. If it matches any pattern, the generation of alternative texts is skipped.

For describing patterns, the term segment must first be defined:

A segment is used to describe a sequence of characters, that follows after a / and is interrupted by a /. Given a URL www.github.com/plone/volto and looking at its path /plone/volto, two such segments can be identified (plone and volto).

Now all patterns can be described precisely:

  • ? - This matches exactly one character inside a segment.
  • * - This matches zero or more characters inside a segment.
  • ** - This matches one or more segments.

Examples

Pattern Path Matches? Explanation
/images/* /de/images/logo.png ✅ * matches any file directly in /images/.
/images/* /de/images/icons/logo.png ❌ Only matches a single segment under /images/.
/images/** /de/images/icons/logo.png ✅ ** matches files in nested folders.
/media/photo?.jpg /de/media/photo1.jpg ✅ ? matches exactly one character in the filename.
/media/photo?.jpg /de/media/photo12.jpg ❌ ? matches only a single character.
/private/** /private/user/data/file.png ✅ Matches any file under /private/.
** /de/user/profile.png ✅ Deactivates generation globally.

Migrate existing images

Chances are, you already have a few images on your Plone site and want to generate alt texts for them as well.

To generate alt texts for existing images without alt texts, you can run the Interaktiv Alt Text Generator: Migration profile from the Zope Management Interface. Beware, this will update every image, so this process may take a while.

Alt Text Generator Migration Profile

The images are processed in batches, the size of which can be configured in the control panel. The speed is determined by the number of concurrent requests to the OpenRouter API, which can be configured in the AI Client control panel. Changes are committed after a batch was processed successfully. In case of a conflict error, the entire batch is aborted and changes are rolled back. In this case, the image batch will not be processed again until another migration run is triggered.

The logger will keep you up to date with the current progress of the migration.

...
INFO    [interaktiv.alttextgenerator:89][waitress-3] Processing 10 images.
INFO    [httpx:1740][waitress-3] HTTP Request: POST https://openrouter.ai/api/v1/chat/completions "HTTP/1.1 200 OK"
...
INFO    [interaktiv.alttextgenerator:94][waitress-3] Committed changes to 10 images.
INFO    [interaktiv.alttextgenerator:99][waitress-3] Processing 8 images.
INFO    [httpx:1740][waitress-3] HTTP Request: POST https://openrouter.ai/api/v1/chat/completions "HTTP/1.1 200 OK"
...
INFO    [interaktiv.alttextgenerator:104][waitress-3] Committed changes to 8 images.
INFO    [interaktiv.alttextgenerator:106][waitress-3] 108 of total 108 images migrated.

Adding this add-on to your project

Install the add-on using pip:

pip install interaktiv.alttextgenerator

or if you're using uv:

uv pip install interaktiv.alttextgenerator

Install from source

You can also install the add-on from the source. In your mx.ini file, add:

[interaktiv.alttextgenerator]
url = git@github.com:interaktivgmbh/interaktiv.alttextgenerator.git
rev = v2.1.0
extras = test

Or using https:

[interaktiv.alttextgenerator]
url = https://github.com/interaktivgmbh/interaktiv.alttextgenerator.git
rev = v2.1.0
extras = test

Contribute

License

The project is licensed under GPLv2.

Credits and acknowledgements 🙏

Generated using Cookieplone (0.9.10) and cookieplone-templates (eae593d) on 2025-11-21 12:25:50.251349. A special thanks to all contributors and supporters!

Metadata

Release files for interaktiv.alttextgenerator 2.1.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 interaktiv.alttextgenerator 2.1.0
File Size Uploaded Provenance Actions
interaktiv_alttextgenerator-2.1.0.tar.gz 1.8 MB Without provenance Details for interaktiv_alttextgenerator-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for interaktiv.alttextgenerator 2.1.0
File Interpreter ABI Platform Actions
interaktiv_alttextgenerator-2.1.0-py3-none-any.whl Python 3 none any Details for interaktiv_alttextgenerator-2.1.0-py3-none-any.whl

Total release size: 1.8 MB

Release files / interaktiv_alttextgenerator-2.1.0.tar.gz

Download URL interaktiv_alttextgenerator-2.1.0.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
53be26ae8fea6fe3d58cb8a4b07c70d9971608f24c4bee080440835f0a420671
BLAKE2b-256 checksum
How to use checksums
9cb35b8f24ffdb590c228552c52100d8a4a79b6b9c686cdbfbe357ba06165e5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.1 {"ci":null,"cpu":"x86_64","distro":{"id":"noble","libc":{"lib":"glibc","version":"2.39"},"name":"Pop!_OS","version":"24.04"},"implementation":{"name":"CPython","version":"3.12.3"},"installer":{"name":"hatch","version":"1.18.1"},"openssl_version":"OpenSSL 3.0.13 30 Jan 2024","python":"3.12.3","system":{"name":"Linux","release":"7.0.11-76070011-generic"}} HTTPX2/2.13.1

Release files / interaktiv_alttextgenerator-2.1.0-py3-none-any.whl

Download URL interaktiv_alttextgenerator-2.1.0-py3-none-any.whl
Size 41.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c066475d2e2aff990a447496202db61485caaf61ab2f5aaa581c87c4fb00ae65
BLAKE2b-256 checksum
How to use checksums
dc164631583790e35a0a5deb3ccd9ff5d9c802f29164fe23f8e81a23170e6aff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.1 {"ci":null,"cpu":"x86_64","distro":{"id":"noble","libc":{"lib":"glibc","version":"2.39"},"name":"Pop!_OS","version":"24.04"},"implementation":{"name":"CPython","version":"3.12.3"},"installer":{"name":"hatch","version":"1.18.1"},"openssl_version":"OpenSSL 3.0.13 30 Jan 2024","python":"3.12.3","system":{"name":"Linux","release":"7.0.11-76070011-generic"}} HTTPX2/2.13.1

Security for interaktiv.alttextgenerator 2.1.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.

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