Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Media Image Metadata

Security covered Under active development 83 sites

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)
Drupal 10–11

Ask your assistant about Media Image Metadata

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
10 months ago
Releases (12 mo)
2 ▼ from 5
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP 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