WordPress plugin intelligence profile

Duplicate Media Guard

Replace existing media files in WordPress without changing their URL or attachment ID. Prevent duplicate media uploads with smart filename and image h …

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 7.1
Current version2.1.1
WordPress coverageTested up to WordPress 7.1
Minimum stackWP 6.2 · PHP 7.2
Directory statusactive
Last directory update29 Oct 20264d ago
Active installations20Adoption metric — not a quality score
WordPress.org rating5.0 / 5 from 2 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Duplicate Media Guard version 2.1.1 as active, updated 4d ago and tested up to WordPress 7.1.

Overview

About this plugin

Duplicate Media Guard is the easiest way to replace existing media files in WordPress and prevent duplicate uploads — all without breaking your URLs or losing your attachment IDs.

Need to replace a media file in your WordPress Media Library? This plugin adds a Replace Media button directly in the Media Library. Simply pick a file, upload the replacement, and choose whether to keep the existing filename and URL or update all links automatically.

The attachment ID is always retained, so nothing breaks.

Beyond media replace, Duplicate Media Guard keeps your Media Library clean by detecting duplicate uploads before they happen. Filename checks catch common re-uploads, exact file hashing identifies byte-identical images, and perceptual hashing can spot resized or recompressed copies even when the filename is different.

Why use this plugin?

  • Replace media in WordPress without creating a new attachment or breaking existing links.
  • Stop wasting storage on accidental duplicate uploads.
  • Keep your Media Library organized with smart duplicate detection.
  • Works with the standard WordPress Media Uploader — no custom UI to learn.

How Replace Media works:

Enable Enable Media Replace in the plugin settings. A Replace media link then appears in the Media Library for any file you have permission to edit. Upload the new file and choose one of two replace modes:

  • Replace file only — keeps the same filename, URL, and folder. The replacement must be the same file type.
  • Replace file and update all links — uses the new filename and automatically updates all matching references stored in WordPress content and metadata.

The attachment ID is preserved in both modes.

Duplicate detection examples:

  • logo.png and logo.png → Duplicate
  • logo.png and logo.jpg → Duplicate (when extension check is disabled)
  • banner.webp and banner.webp → Duplicate
  • photo.jpg and a resized or recompressed copy.webp → Possible visual duplicate (when visually similar detection is enabled)

This helps reduce unnecessary duplicates and storage use while still allowing intentional uploads.

Key Features

  • Replace existing media file while retaining its attachment ID and URL — enable with one setting.
  • Review possible image duplicates with existing-media previews before uploading.
  • Detect byte-identical images using exact file hashes.
  • Identify resized or recompressed images using perceptual hashes.
  • Match filenames with or without their file extensions.
  • Enable or disable duplicate protection and image hash checks independently in the settings.
  • Use the standard WordPress Media Uploader — no custom upload interface needed.
  • Index existing image fingerprints gradually in the background.

How to Replace Media in WordPress (Step by Step)

  • Go to Settings → Duplicate Media Guard and turn on Enable Media Replace.
  • Open your WordPress Media Library.
  • Click any media item and select Replace media.
  • Upload the replacement file.
  • Choose your replace mode and click Replace — the attachment ID and all internal links are preserved.

Duplicate Detection

  • Select an image through the WordPress Media Library.
  • The plugin checks the filename, exact file hash, and perceptual hash of indexed images.
  • If potential matches are found, a warning shows previews and lets you cancel or proceed. Files with no matches upload without a confirmation.
  • Files uploaded outside the standard Media Uploader retain the server-side filename duplicate check.

Use Enable Duplicate Protection to turn duplicate checks on or off. Use Enable Image Hash Checks to control exact and visual image matching. When image hash checks are disabled, filename duplicates use the standard WordPress upload notice and copy-URL action, while other files in the same bulk upload continue normally.

Existing images are indexed gradually, so visual matching may be incomplete until indexing has progressed.

Replace Existing Media

Enable Enable Media Replace in the plugin settings to show the Replace media action in the Media Library. Users who can upload files and edit the selected media item can choose a replacement and select how it should be applied:

  • Replace the file only keeps the existing filename, URL, and folder. The replacement must have the same file type.
  • Replace the file, use the new file name, and update all links applies the uploaded filename and updates matching references in WordPress content and metadata. Links on external websites are not changed.

The attachment ID is retained in either mode. Under Upload Destination, choose whether to use today’s date or keep the existing media date. When using a new filename, this choice also determines the upload folder.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • duplicate media
  • duplicate upload
  • media library
  • media replace
  • replace media
Compatibility & maintenance

Compatibility & maintenance

Tested with WP 7.1

Marked as tested with the current WordPress 7.1 release.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to7.1
Minimum requirementsWordPress 6.2 · PHP 7.2
Update activity29 Oct 20264d ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

Version2.1.02.1.1
WordPress compatibility7.1.37.1.4
Version1.0.12.1.0
WordPress compatibility7.1.27.1.3
Version1.0.01.0.1
WordPress compatibility7.17.1.2
Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.