This module allows the comparison, detection and restriction of duplicate media
entities within a site.
Cleaning up the duplicate media items is currently outside the scope of this module. That's because it's a hard task. Depending on media usage in fields, usage across translations, usage in token embedded media, usage in config (blocks, etc).
Merge duplicates
3.x implements an experimental feature to media entities detected as duplicates. Use with care and report feedback.
Installation
- To install this module,
composer requireit, or place it in your modules folder and enable the module. - Generate initial checksums if you have existing media items. You can use the form linked from the status page or run the
drush media-duplicates:checksums:rebuildcommand. (Currently only supports Drush 9+)
Usage
- Install this module as early as possible in your development process to reduce any technical debt you later have to clean up.
- Module allows progressive enhancement by having settings that
- Allow you to generate a report but don't restrict duplicates.
- Restrict new duplicates but still allow you to save existing.
- Restrict all duplicates, both new and existing.
- Use in conjunction with Entity Usage to help find where duplicates are used and consolidate.
Plugin architecture
This module allows media type developers to implement a MediaDuplicatesChecksum plugin to integrate with this module.
Alternatives
- https://www.drupal.org/project/media_dupe_detect seems to be very similar - would be great if someone could do a comparison. Also see #3517939: Difference with similar modules and possible combining efforts?
- https://www.drupal.org/project/entity_reference_manager seems to be a helpful tool for media merging. While it might not be ideal for mass-merging, it might be an alternative to merge only certain media entities
Supporting organizations:
proudly helps to maintain this module for the Drupal community
Project information
- Project categories: Administration tools, Media
2,996 sites report using this module
- Created by nterbogt on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
3.0.0-alpha2
released 18 November 2026
Works with Drupal: ^11
Install:
Development version: 3.x-dev updated 30 Nov 2026 at 10:38 UTC





