Skip to content

Photo Metadata

Read and enhance photo metadata

For Drupal 11 ยท PHP 8.3+

Commands
Drush
# How much of the library carries usable metadata.
drush photo-metadata:coverage

# Read metadata into every photograph missing it.
drush photo-metadata:backfill

# Describe ten, to read the output and see what a full run costs.
drush photo-metadata:describe --limit=10

Three modules, each usable without the next.

Photo Metadata

Reads location, capture date, camera, caption, credit and keywords out of each image file into media fields, and mirrors the Focal Point crop beside them.

Needs Media, Geofield and the PHP exif extension.

Read about Photo Metadata

Photo Metadata AI

Describes each photograph in one call to a vision model: alt text, caption, keywords, and the objects, people and named things it shows, each with a confidence. Optionally writes the description back into the file.

Needs Photo Metadata and AI.

Read about Photo Metadata AI

Photo Metadata Picker

Adds "Media library, with nearby photographs", a media library widget that also lists the photographs taken closest to the content being edited. Ships photo library, map and metadata-gaps views.

Needs Photo Metadata, Media Library and Views.

Read about Photo Metadata Picker

Install

Photo Metadata needs Media, Geofield and the PHP exif extension. Its fields are created once an image media type exists, and, for keywords, a tags vocabulary.

The fields it creates

Install with Composer and Drush
composer require drupal/photo_metadata
drush pm:install photo_metadata

Enable photo_metadata_ai or photo_metadata_picker as well for the others.