media_duplicates
2,678 sites
Security covered
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).
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?