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
- Go to your Media Library
- Find the image you want to replace
- Click “Replace Media” in the row actions
- Upload the new file
- 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)
- Go to Media → Library
- Hover over any media item
- Click “Replace Media” in the action links
From Attachment Edit Screen
- Click on any media item to open it
- Look for the “Replace Media” meta box in the sidebar
- 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
| Option | Default | What It Does |
|---|---|---|
| Keep original filename | Checked | Uses the old file’s name for the new file |
| Keep original upload date | Checked | Preserves the original upload timestamp |
Keeping the original filename is recommended to maintain URL consistency.
What Gets Updated
When you replace a media file:
| Updated Automatically | Not Changed |
|---|---|
| The actual file on disk | Attachment ID |
| All thumbnail sizes | Permalink/URL structure |
| File metadata | References in posts |
| Modification date | Alt text and captions |
Replacing Different File Types
You can replace a file with any compatible type:
| Original | Can Replace With |
|---|---|
| JPEG | JPEG, PNG, WebP, GIF |
| PNG | JPEG, PNG, WebP, GIF |
| Video | Video (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:
- The page reloads automatically
- You’ll see a success message
- The new image displays immediately
- All thumbnails are regenerated
- 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.Get access to all 147 modules with a single license