drupal / varbase_ai_image_alt
AI for images in Varbase: alt text on demand, and a description and tags written on save.
Package info
git.drupalcode.org/project/varbase_ai_image_alt.git
Type:drupal-recipe
pkg:composer/drupal/varbase_ai_image_alt
Requires
- drupal/core: ~11.4.0
- drupal/drupal_cms_ai: ~2
- drupal/field_group: ~4.0
- drupal/tagify: ~2.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-24 18:34:25 UTC
README
Varbase AI Image Alt
AI for images in Varbase, built on the Drupal CMS AI ecosystem:
- Alt text, on demand. The
ai_image_alt_textbutton and bulk action from thedrupal_cms_aidefault recipe, with thegenerate ai alt tagspermission for Varbase's editorial roles. - Description and tags, on save. When an image is saved with them empty, AI writes an Image description from the image, then picks or creates up to 5 Image tags in the Image Classification vocabulary from that description. Editors can type their own; a filled field is left alone. Both fields sit in an open AI description and tags group on the Image media form, and the tags use the Tagify widget. Varbase content types take images through their media fields and Add Media, which opens the media library to pick an image or upload one; its upload form leaves the two fields out to stay short, and AI fills them on save. The recipe adds fields to the Image media type only, never to a content type.
The field, vocabulary and image style machine names match the AI Image Classification recipe, so the two can be applied on one site without duplicating fields.
Requirements
- The Drupal CMS AI default recipe (
drupal/drupal_cms_ai) must be applied before this recipe. - An AI provider with default models for Chat with Image Vision (description) and Chat with Complex JSON (tags) at
/admin/config/ai/settings.
Each image saved with an empty description or empty tags makes AI calls, including images added by bulk upload. Image content is sent to the configured provider.
Installation
Add the recipe using composer:
composer require drupal/varbase_ai_image_alt:~2
Change directory to /web or /docroot
Run the Drupal recipe bash script:
bash core/scripts/drupal recipe ../recipes/varbase_ai_image_alt
or
Run the Drush recipe command:
drush recipe ../recipes/varbase_ai_image_alt
What this recipe does
- Adds
field_image_descriptionandfield_image_tagsto the Image media type, theimage_classificationvocabulary and thescale_for_ai_visionimage style, and shows both fields on thedefaultform display in an opendetailsfield group (group_ai_image_details, Field Group), with the Tagify widget on the tags. Themedia_libraryform display does not show them. - Adds two AI Automators that run on save:
media.image.field_image_description.default(vision) andmedia.image.field_image_tags.default(taxonomy, from the description). - Grants
site_admin,seo_admin,content_adminandcontent_editor:generate ai alt tagscreate,edit,selectandview terms in image_classification
