Download for Google Chrome (opens in a new tab)
Download for Edge (opens in a new tab)
Download for Firefox (opens in a new tab)Newsletter
New laws and deadlines, court rulings, enforcement and WCAG changes. A short summary once a week, and an e-mail straight away when something important happens. Unsubscribe at any time.
A Python package for the alt generator: sync and async clients, the dockaccess-alt command and helpers for FastAPI, Django and Flask.
PyPI (pip)
The dockaccess-alt-generator package works on Python 3.10 and newer and installs with pip; its dependencies are httpx and Pillow. It gives you a synchronous and an asynchronous client for any framework, the dockaccess-alt command for the terminal and CI pipelines, and ready helpers for FastAPI, Django and Flask (extras [fastapi], [django], [flask]).
The package checks and rebuilds every image before sending it. HEIC photos need the [heif] extra, and AVIF needs Pillow built with AVIF support.
You connect the application with dockaccess-alt connect, giving the site token and the e-mail address and password of your DockAccess account; dockaccess-alt status shows the connection.
Install the package with pip (Python 3.10 or newer):
pip install dockaccess-alt-generator
Connect the application and check its status. When asked, enter the site token, the public address of the application and the e-mail address and password of your DockAccess account.
dockaccess-alt connect dockaccess-alt status
The password is used only to connect and is not stored. The address must be one of the site's domains in DockAccess.
Generate alt texts in your code (FastAPI, Django, Flask and Celery examples are in the documentation):
from dockaccess_alt import AltGenerator generator = AltGenerator.from_env(env_file=".env") with open("photo.jpg", "rb") as photo: print(generator.generate(photo, language="en").text)
Or generate them for a folder of images, for example in CI; the manifest skips unchanged images in the next run:
dockaccess-alt generate static/img -r --lang en --manifest alts.json
The client returns the description as plain text; where to save it and how to show it in templates is up to your application. In a CI pipeline, dockaccess-alt generate describes the images of a folder and writes the descriptions to a manifest file.
The free plan describes 10 images a day on one site. Paid plans count images a month: Starter 500, Pro 2,000 and Agency 20,000. The limit counts the images described in your DockAccess account and by every integration together.
Check a generated description before you publish it, especially names, numbers and the text visible in the picture. A decorative image should have an empty alt, and an image that is the only content of a link describes where the link goes.
To write a description, the AI service gets the image, the language and the context and tone you set.
The AI generator writes alt texts for your images in your CMS or in your own code.
See the installationFree up to 10 images a day.