AI Alt Text
๐ค ๐ฌ AI Alt Text
README ยท Getting started ยท AI providers ยท Settings ยท Console commands ยท Images ยท Costs
Write alt text for every image on your Craft site with AI: one click, in bulk, or as images are uploaded, in each site's language.
๐จ New in 5.3: OpenRouter support, with hundreds of vision models behind one API key.
๐จ New in 5.2: Langdock support, for Claude and GPT models hosted in the EU.
Plugin Store | GitHub Repository
โจ What you get
- Any vision model, one key. Use Anthropic or OpenAI directly, Langdock (hosted in the EU), or OpenRouter, which offers over 300 image-capable models, including Claude, GPT, Gemini, Grok, Qwen and DeepSeek. Switching model is one setting. OpenAI and Anthropic models are supported, and more than 50 others worked in our tests. See AI providers.
- Pennies for a whole library. With
gpt-6-luna, alt text for 1,000 images costs about 6 cents. Compare models. - Every site's language. Alt text is written in the site's language, and can be saved to each site of a multi-site install.
- One click, in bulk, or automatically. From an asset's action menu, for selected assets, from the bulk actions utility, on upload or file replacement, or from the command line. Bulk work runs through Craft's queue, where failed jobs can be retried.
- Awkward images handled. Large images are scaled to each provider's limits, SVG, AVIF, HEIC and HEIF are converted, animated GIFs use their first frame, and private volumes are sent as base64. See Images.
- Your prompt, your rules. Edit the instructions sent to the AI, with
{asset.*}and{site.*}variables. See Settings. - Permissions built in. Bulk generation has its own utility permission, and single assets follow the asset's own save permission.
๐ฌ Video walkthrough
๐ Quick start
Craft CMS 5.0.0 or later (running Craft 4? Use the 4.x branch), PHP 8.2 or later, and an API key for Anthropic, OpenAI, Langdock or OpenRouter.
composer require heavymetalavo/craft-aialttext
./craft plugin/install ai-alt-text
- Choose a provider and add its API key under Settings โ AI Alt Text, see AI providers.
- Add the native
altfield to your asset volumes' field layouts, see Field requirements. - Generate alt text from an asset's action menu, the bulk actions utility, on upload or from the command line.
Then use it in your templates:
<img src="{{ asset.url }}" alt="{{ asset.alt ?: asset.title }}">
๐ Documentation
- Getting started - requirements, installation, the
altfield, generating alt text, troubleshooting - AI providers - API keys for Anthropic, OpenAI, Langdock and OpenRouter, and choosing a model
- Settings - every setting, the default prompt, image detail, reasoning effort and permissions
- Console commands - stats, missing, all and single
- Images - supported file types, scaling and conversion, private volumes and limitations
- Costs - estimated cost per alt text by model, and avoiding unexpected charges
โ ๏ธ Disclaimer
We've taken some steps to try prevent unexpected costs with default plugin settings (e.g. detail: low and the suggested small model gpt-6-luna) though we take no responsibility for excessive API token usage that may result from mistakes, bugs, or security vulnerabilities within this plugin so use at your own risk. See Avoiding unexpected charges.
๐ Support
If you encounter any issues or have questions, please submit them on GitHub.
Credits
The eye icon used in this project is from SVG Repo and is available under the CC0 1.0 Universal (Public Domain) license.
Standard
Plus $9/year after one year.
To install this plugin, copy the command above to your terminal.







