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). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Metadata Sanitizer

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

This module automatically removes potentially sensitive hidden metadata, such as GPS coordinates and author information, from uploaded files like images, PDFs, and Office documents. It helps protect user privacy and meet data protection regulations by stripping this data at upload time or in bulk, and also offers integration with the Drupal AI ecosystem for assisted configuration and operations.

Every file uploaded to your Drupal site may silently carry GPS coordinates, camera serial numbers, author names, and other hidden metadata that can expose your users and your organisation without anyone realising it.

Metadata Sanitizer strips that data automatically, at upload time and in bulk, using the battle-tested exiftool binary. Once removed, the metadata cannot be recovered from the sanitized file.

Why Metadata Sanitizer?

  • Privacy by default — sanitize on every upload, not as an afterthought.
  • GDPR / data minimisation — removes personal data embedded in files before storage or delivery, helping organisations meet GDPR and similar data protection obligations.
  • Any file type — not limited to images. Works on PDFs, Office documents, and any format exiftool supports.
  • Bulk remediation — clean an existing library of thousands of files with a single Drush command.
  • Drupal AI ecosystem — optional submodules integrate with the Drupal AI module (AI Agents + Tool API), enabling AI-assisted configuration, file profiling, and autonomous bulk-clean operations.

Features

  • Automatic sanitization on upload (configurable, toggleable).
  • Re-sanitization on file replacement when the underlying URI changes.
  • Bulk-clean command: drush metadata_sanitizer:clean with filters for extensions, regex patterns, MIME types, and entity field references.
  • Configurable file extensions and optional timestamp preservation (exiftool -P).
  • Admin UI at Configuration → Media → Metadata Sanitizer.
  • Dedicated administer metadata sanitizer permission.
  • Runtime verification of exiftool availability.

Requirements

  • Drupal 10 or 11.
  • exiftool installed on the system path.

Debian/Ubuntu: sudo apt-get install -y libimage-exiftool-perl

RHEL/Rocky/Alma: sudo dnf install -y perl-Image-ExifTool

macOS: brew install exiftool

DDEV: add libimage-exiftool-perl to webimage_extra_packages in .ddev/config.yaml.

Bulk Clean — Drush Examples

drush metadata_sanitizer:clean --extensions='jpg,jpeg,png,pdf'
drush metadata_sanitizer:clean --mime='image/jpeg,application/pdf'
drush metadata_sanitizer:clean --pattern='/^invoice_/'
drush metadata_sanitizer:clean --field=field_document

Note: Bulk cleaning is irreversible for removed metadata. For large libraries, run via CLI, because UI requests may time out.

Optional: Drupal AI Integration

Metadata Sanitizer AI Agents (metadata_sanitizer_ai_agents)

Adds an AI advisor tab under the module settings page. The bundled AI Agent can check your environment, profile your managed files, recommend settings, estimate the scope of bulk cleaning, preview metadata for verification, generate a conservative Drush command, and perform confirmed bulk cleaning via natural language.

Metadata Sanitizer Tool API (metadata_sanitizer_tool_api)

Exposes module operations as Tool-API-aligned plugins, making them discoverable and invocable by Tool-API connectors such as tool_ai_connector. Compatible with the Drupal AI ecosystem on both Drupal 10 and 11.

Permissions

administer metadata sanitizer — controls access to the admin UI, Tool API wrappers, and AI advisor. Must be explicitly granted; not assigned by default.

Depends on

Dependencies of the latest stable release

  • file Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Jul 2025
Latest release
2 months ago
Releases (12 mo)
4 ▲ from 2
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.2.x-dev Dev 10–11 Jun 24, 2026
1.2.0 Stable 10–11 Jun 15, 2026
1.1.0 Stable 10–11 Mar 1, 2026
1.0.1 Stable 10–11 Nov 14, 2025
1.0.x-dev Dev 10–11 Jul 13, 2025
1.0.0 Stable 10–11 Jul 9, 2025