Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Media Image Metadata

64 sites Security covered Drupal 10–11
View on drupal.org

This module extracts metadata like captions and descriptions from image files using IPTC, EXIF, and XMP standards. It automatically maps this data to your media fields, with a fallback to the filename for titles if no other metadata is found. You can also customize the mapping for specific metadata attributes.

This module extracts metadata from image files and maps them to media fields.

Any metadata embedded in images according to the standards:

can be retrieved by this module.

A mapping is provided to make it easier to access the most commonly-used attributes without having to know exactly the code/address of the data in the different standards.

Metadata Attributes Provided

The above table shows the prioritization order for each metadata attribute. For example, when looking for the caption metadata attribute, the module will first look at the 2#120 value (in IPTC data), and if this is empty, it will fall back to dc:description (in XMP data), and finally to ImageDescription (in EXIF data).


Note:

The title attribute will fall back to the filename, if none of the above sources returned a non-empty value.

Retrieving unmapped metadata from images

If your images have metadata embedded in different locations, you can easily alter the above mapping by implementing the hook_media_image_metadata_alter() hook in a custom module, like so:

function foo_media_image_metadata_alter(array &$normalized_metadata, array $raw_metadata) {
  // Use IPTC "Special Instruction" as caption.
  if (!empty($raw_metadata['iptc']['2#40'])) {
    $normalized_metadata['caption'] = $raw_metadata['iptc']['2#40'];
  }
}

Requirements

  • Media module (from core)
  • (Optional) PHP 8.2+ with EXIF extension (only if you need EXIF metadata)

Depends on

Dependencies of the latest stable release

  • media Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Sep 2025
Latest release
9 months ago
Releases (12 mo)
7 ▲ from 0
Maintenance
Slowing

Release Timeline

Releases

Version Type Core Release date
1.0.6 Stable 10–11 Nov 27, 2025
1.0.5 Stable 10–11 Oct 20, 2025
1.0.4 Stable 10–11 Oct 1, 2025
1.0.3 Stable 10–11 Sep 26, 2025
1.0.2 Stable 10–11 Sep 26, 2025
1.0.1 Stable 10–11 Sep 24, 2025
1.0.x-dev Dev 10–11 Sep 20, 2025