This module is part of the AI module ecosystem and included in DXPR CMS.
Generate accurate, descriptive alt text automatically using AI vision models. Improve accessibility and search rankings while maintaining editorial control through human-in-the-loop verification.
Generating accurate and descriptive alt texts enhances your website's accessibility and improves search engine optimization (SEO). Alt texts help search engines understand image content, which can improve your site's ranking in image search results. By using this module, you ensure high-quality, consistent alt text generation that adheres to best practices for both accessibility and SEO.
composer require drupal/ai_image_alt_text
drush en ai_image_alt_text
To enable bulk processing of existing images, also enable the sub-module:
drush en ai_image_bulk_alt_text
Spin up DXPR CMS: Drupal pre-configured with DXPR Builder, DXPR Theme, AI Image Alt Text module, and security best practices.
This module uses the AI module as its foundation. It supports any vision model available through providers like OpenAI, Anthropic, and Fireworks AI.
The module works with any vision model available through the Drupal AI module, including OpenAI (GPT-4o), Anthropic (Claude), Google (Gemini), and Fireworks AI. Switch models at any time without changing your workflow.
By default the module uses a human-in-the-loop approach: a "Generate" button appears next to the alt text field on image widgets. Click it to produce a suggestion, review and edit as needed, then save. You can also enable fully automatic generation on upload in the settings at /admin/config/ai/ai_image_alt_text, with an option to hide the manual button entirely.
Yes. The module detects the entity’s language setting and generates alt text in the corresponding language. This works automatically with Drupal's multilingual system; no extra configuration is required.
Yes. Visit /admin/config/ai/ai_image_alt_text to edit the prompt template and configure how images are preprocessed before being sent to the AI. You can tailor the instructions to match your editorial style and accessibility requirements.
Search engines use alt text to understand image content and index it for image search results. AI Image Alt Text generates accurate, descriptive alt text that follows accessibility best practices, which improves both your search visibility and your WCAG compliance.
The Automatic Alternative Text module offers similar functionality by leveraging Azure Computer Vision to generate alt texts when an entity is saved.