Today we are talking about PHP, Open Source, and Sustainability with guest Elizabeth Barron. We'll also cover AI Image Classification as our module of the week.
Have you ever wanted the images in your Drupal media library to be automatically given alt text, a rich description, and a set of tags, using AI? There's a recipe for that.
How old: created in Sep 2025 by Artem Dmitriiev (a.dmitriiev) of 1xINTERNET
Versions available: 1.1.1, which requires Drupal 11.2 or newer
Maintainership
Actively maintained, latest release and commit just two weeks ago
Security coverage
Number of open issues: 9 open issues, 4 of which are bugs
Usage stats:
No usage data reported
Module features and usage
This recipe applies core's image media type recipe, then adds a description field and a tags field to image media, with tags in a new "Image Classification" vocabulary
Editors get a "Generate Alt Text" button right on the image field, using the Field Widget Actions module, with a prompt written like an accessibility expert: under 100 characters, no "image of", flag logos and graphics
On save, a vision model writes a description of up to eight sentences: colours, photo versus illustration, people, mood, and key objects, using the media name for context
Tagging is chained off that description rather than the image itself, picking or creating up to five short, general terms, and reusing similar existing tags where it can
It also adds bulk actions to the media admin view, so you can run description and tagging across an existing library, not just new uploads
Description and tag filters are added to the media library, including the widget, so editors can search for "sunny summer day" right in the image picker
The stated bigger goal is making images discoverable by RAG and other AI search, so good descriptions become a foundation for future AI features. In fact, this recipe is a dependency for the Canvas AI Image Search recipe, which is still a work in progress
Under the hood, images get scaled to 400px wide and converted to PNG before they're sent to the model, which keeps things faster and cheaper
One caveat: your site needs an AI provider with a default "chat with image vision" model, and the recipe checks for that when it's applied
Also worth a look: the description prompt asks the model to describe people's age, gender, and ethnicity, and even name them if it can, so you may want to review that prompt for your privacy policies, and adjust accordingly
Like any recipe, it provides a robust starting point for some compelling features, and every prompt and setting can be tweaked after you apply it
Lastly, I wanted to mention that in today's Driesnote in here in Rotterdam, Dries demoed being able to use MCP to search images on his own site. A recipe like this could help you make sure the images in your media library have sufficient metadata to make that work reliably
Podden och tillhörande omslagsbild på den här sidan tillhör
Talking Drupal Hosts. Innehållet i podden är skapat av Talking Drupal Hosts och inte av,
eller tillsammans med, Poddtoppen.