Media Replacement

Replace any media file while keeping the same URL and attachment ID. Update a product photo used in 50 posts without touching any of them — just swap the file and every reference updates automatically.

Use Cases

  • Update outdated product images used across multiple pages without re-uploading
  • Fix wrong logos or team photos while keeping all references intact
  • Refresh brand assets site-wide with a single file replacement

How It Works

  1. Go to your Media Library
  2. Find the image you want to replace
  3. Click “Replace Media” in the row actions
  4. Upload the new file
  5. All references across your site now show the new image

The attachment ID, URL structure, and all connections remain identical — only the actual file changes.

Where to Find It

From Media Library (List View)

  1. Go to Media → Library
  2. Hover over any media item
  3. Click “Replace Media” in the action links

From Attachment Edit Screen

  1. Click on any media item to open it
  2. Look for the “Replace Media” meta box in the sidebar
  3. Click “Upload a new file”

The Replacement Modal

When you click Replace Media, a modal appears showing:

  • Current file preview (thumbnail or icon)
  • File information (name, type, size, dimensions)
  • File upload input for the new file
  • Options for filename and date handling

Replacement Options

OptionDefaultWhat It Does
Keep original filenameCheckedUses the old file’s name for the new file
Keep original upload dateCheckedPreserves the original upload timestamp

Keeping the original filename is recommended to maintain URL consistency.

What Gets Updated

When you replace a media file:

Updated AutomaticallyNot Changed
The actual file on diskAttachment ID
All thumbnail sizesPermalink/URL structure
File metadataReferences in posts
Modification dateAlt text and captions

Replacing Different File Types

You can replace a file with any compatible type:

OriginalCan Replace With
JPEGJPEG, PNG, WebP, GIF
PNGJPEG, PNG, WebP, GIF
PDFPDF
VideoVideo (same container)

While you can change image formats, keeping the same format is recommended to avoid unexpected behavior with caching or plugins that rely on file extensions.

Upload Progress

A progress bar shows upload status. For large files, you’ll see real-time progress as the file uploads and processes.

After Replacement

Once replacement completes:

  1. The page reloads automatically
  2. You’ll see a success message
  3. The new image displays immediately
  4. All thumbnails are regenerated
  5. Caches are cleared for the attachment

Revision Tracking

The module tracks replacements:

  • Revised date shows when the file was last replaced
  • Replaced By shows which user performed the replacement (if different from original author)

Find this information in the attachment’s “Publish” box.

FAQ

Will this break my existing posts?No — that’s the whole point! All posts, pages, widgets, and theme locations using this image will show the new version automatically because the URL and ID stay the same.
What about CDN caching?Most CDNs respect WordPress’s cache invalidation. If you use a CDN and the old image persists, you may need to purge the CDN cache manually.
Can I undo a replacement?There’s no built-in undo. If you might need the original, download it before replacing. Consider keeping important originals in a backup folder.
Does this work with WooCommerce product images?Yes. Product images, gallery images, and variation images can all be replaced. The product will display the new image without any editing.
What if the new file is a different size?The module regenerates all thumbnail sizes based on the new file’s dimensions. This ensures responsive images work correctly.
Who can replace media?Anyone who can edit the media item. By default, this means the original uploader and administrators.
PRO

Get access to all 147 modules with a single license

Upgrade to Pro