vectorbross / vb_ai_image_alt_text
Adds AI generated image alt text on top of VB AI Core. Requires a vision capable provider recipe.
Package info
bitbucket.org/vectorbross/vb_ai_image_alt_text
Type:drupal-recipe
pkg:composer/vectorbross/vb_ai_image_alt_text
Requires
- drupal/ai_image_alt_text: ^1.0
- drupal/core: ^11.4
- vectorbross/vb_ai_core: ^1.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-12-03 21:54:34 UTC
README
Adds AI generated alt text for image fields on top of
vb_ai_core.
Content managers get a button next to the alt text field that generates a
description of the image with a vision model.
What it installs
| Module | Purpose |
|---|---|
ai_image_alt_text | Generates image alt text with a vision model |
It also applies vb_ai_core (ai, key, token) first.
What it configures
| Setting | Value | Effect |
|---|---|---|
autogenerate | false | Alt text is only generated via the button |
hide_button | false | The generate button stays visible |
ai_model | not set | The default vision provider is used |
The recipe also imports the ai_image_alt_text image style. The module uses
it to resize images before they are sent to the provider. Recipes do not
import config entities from a module's config/install automatically, so
this is done explicitly in recipe.yml.
Requirements
- Drupal 11.4+
- Drush 13+
- The project setup from
vb_ai_core(composer/installers2.3+, therecipes/{$name}installer path and the VBrepositoriesentry) - A vision capable provider recipe, already required and applied, for
example
vb_ai_provider_anthropic. The provider recipe sets the default for thechat_with_image_visionoperation, which this module uses.
Install
Require the recipe. Composer pulls in drupal/ai_image_alt_text and
vb_ai_core as dependencies.
ddev composer require vectorbross/vb_ai_image_alt_text
Apply the recipe
Make sure a provider recipe has been applied first (see
Requirements). Run from the project root; Drush runs from
the web docroot, so the path starts with ../recipes.
ddev drush recipe ../recipes/vb_ai_image_alt_text
ddev drush cr
Permissions
The recipe grants the Generate AI Alt Tags permission to the
webmaster role and creates that role if it does not exist yet. The
administrator role already has every permission. No other roles get
access; grant it manually if another role needs it.
Verify
ddev drush pm:list --status=enabled --filter=ai_image_alt_text
Then edit content with an image field (the Article type has one by default), upload an image and click the generate button next to the alt text field. The alt text is filled in by the vision model.
Options
- Settings live at
/admin/config/ai/ai_image_alt_text. - To generate alt text automatically on upload, set
autogenerate: trueinrecipe.yml. Every uploaded image is then sent to the AI provider, which costs API credits and may need to be covered in the client's privacy policy. - For existing images, enable the
ai_image_bulk_alt_textsubmodule to generate alt text in bulk.
License
GPL-2.0-or-later. See LICENSE.txt.