Title: Clarvity Media Replace
Author: Krishna Sagar
Published: <strong>Otoba 8, 2026</strong>
Last modified: Otoba 8, 2026

---

Search plugins

![](https://ps.w.org/clarvity-media-replace/assets/banner-772x250.png?rev=3734903)

![](https://ps.w.org/clarvity-media-replace/assets/icon-256x256.png?rev=3734903)

# Clarvity Media Replace

 By [Krishna Sagar](https://profiles.wordpress.org/onemorekrishna/)

[Download](https://downloads.wordpress.org/plugin/clarvity-media-replace.1.0.0.zip)

 * [Details](https://hau.wordpress.org/plugins/clarvity-media-replace/#description)
 * [Reviews](https://hau.wordpress.org/plugins/clarvity-media-replace/#reviews)
 *  [Installation](https://hau.wordpress.org/plugins/clarvity-media-replace/#installation)
 * [Development](https://hau.wordpress.org/plugins/clarvity-media-replace/#developers)

 [Support](https://wordpress.org/support/plugin/clarvity-media-replace/)

## Description

Need to swap a product photo, a team headshot or an outdated banner? Instead of 
hunting down every page, post, widget and page-builder section that uses it, open
the image in the Media Library, click **Replace Image**, choose the new one, and
confirm. Every place that used the old image now shows the new one.

**How it works**

The original library item is kept: same ID, title, alt text, caption and permalink.
Only its file is swapped and all thumbnail sizes are regenerated. Anything that 
stores the image by ID keeps working with no changes at all, and any file URL that
did change is updated automatically across the site.

**Features**

 * A “Replace Image” button in the Attachment details sidebar (grid view), the Edit
   Media screen and the list-view row actions.
 * Pick an existing library image or upload a new one, using the familiar media 
   window.
 * A confirmation prompt showing the current and new images side by side, where 
   the image is used, and a required “I understand” checkbox.
 * Keep the current filename (links stay identical) or use the new file’s name.
 * Changing file type (for example JPG to PNG or WebP) is supported; links are updated
   for you.
 * Serialization-safe URL updates in post content, excerpts, custom fields, term
   meta and settings, including Elementor’s JSON data.
 * Automatic rollback: if anything fails, the original files and data are restored.
 * Optional clean-up of the replacement’s own library entry when it isn’t used anywhere.
 * Loads nothing on the front end, and in wp-admin only on screens that already 
   load the media window.

**Privacy**

This plugin does not collect data, set cookies, or contact any external service.

### Usage

 1. Go to **Media  Library** and click an image.
 2. In the Attachment details sidebar, click **Replace Image**. (In list view, hover
    the image row and click **Replace Image**.)
 3. Choose the new image from the library, or open the **Upload files** tab to upload
    one, then click **Use this image**.
 4. Review the confirmation prompt: both images, where the current one is used, and
    the filename options.
 5. Tick **I understand…** and click **Replace Image**.
 6. If you use a page cache or CDN, clear it so visitors see the new image straight
    away.

By default, Editors and Administrators can replace images (it needs the `upload_files`
and `edit_others_posts` capabilities), because a replacement changes content across
the whole site.

## Installation

 1. In wp-admin go to **Plugins  Add New  Upload Plugin**, choose `clarvity-media-replace.
    zip` and click **Install Now**. (Or unzip it into `/wp-content/plugins/`.)
 2. Click **Activate**.
 3. There are no settings. Go to **Media  Library** to use it.

## FAQ

### Will this break my links?

No. With “Keep the current filename” and the same file type, the image’s URL doesn’t
change at all. When the URL must change (a new file type or filename, or new thumbnail
dimensions because the aspect ratio differs), every stored copy of the old URL is
rewritten to the new one.

### How are featured images, galleries and custom fields handled?

They store the image’s ID, and the ID never changes, so they show the new image 
automatically. This covers featured images, WordPress and WooCommerce galleries,
ACF and other custom fields that store IDs, the site logo, site icon and header 
image, and Elementor image widgets. Custom fields and page-builder data that store
URLs are updated by the URL rewrite.

### What if the new image has a different shape or is smaller?

All thumbnail sizes are regenerated from the new image. Each old size URL is mapped
to the same size of the new image. If the new image is too small to have that size,
the full-size image is used instead.

### What if something goes wrong halfway?

The current files are moved to a temporary folder first. If copying or processing
the new image fails, the new files are deleted, the originals are moved back, and
the attachment data is restored. Nothing is left half-changed.

### Can I undo a replacement?

Not with one click. The old file is permanently replaced, which is why the confirmation
prompt asks you to acknowledge that. Keep a backup, or replace the image again with
the old file.

### Does it work with images stored in the cloud (S3, etc.)?

The image file must be on the server’s disk. If an offload plugin removed the local
copy, the plugin stops with a clear message and changes nothing.

### Why is some data left unchanged?

If a setting stores PHP objects, rewriting it could corrupt it, so it is skipped
and the result message tells you how many entries were skipped. This is rare for
image URLs.

### Can developers extend it?

Yes:

 * `clarvity_mr_required_capability` (filter): the capability needed to replace 
   images. Default `edit_others_posts`.
 * `clarvity_mr_url_pairs` (filter): the old => new URL paths about to be applied.
 * `clarvity_mr_replacement_targets` (filter): the tables and columns searched for
   URLs.
 * `clarvity_mr_image_replaced` (action): fires after a replacement, with the attachment
   ID, the replacement’s ID and the URL pairs. Useful for purging caches.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Clarvity Media Replace” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Krishna Sagar ](https://profiles.wordpress.org/onemorekrishna/)

[Translate “Clarvity Media Replace” into your language.](https://translate.wordpress.org/projects/wp-plugins/clarvity-media-replace)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/clarvity-media-replace/),
check out the [SVN repository](https://plugins.svn.wordpress.org/clarvity-media-replace/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/clarvity-media-replace/)
by [RSS](https://plugins.trac.wordpress.org/log/clarvity-media-replace/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.0

 * First release.

## Meta

 *  Version **1.0.0**
 *  Last updated **kwana 1  ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.2 or higher **
 *  Tested up to **7.1.3**
 *  PHP version ** 7.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/clarvity-media-replace/)
 * Tags
 * [attachments](https://hau.wordpress.org/plugins/tags/attachments/)[images](https://hau.wordpress.org/plugins/tags/images/)
   [media](https://hau.wordpress.org/plugins/tags/media/)[media library](https://hau.wordpress.org/plugins/tags/media-library/)
   [replace image](https://hau.wordpress.org/plugins/tags/replace-image/)
 *  [Advanced View](https://hau.wordpress.org/plugins/clarvity-media-replace/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/clarvity-media-replace/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/clarvity-media-replace/reviews/)

## Contributors

 *   [ Krishna Sagar ](https://profiles.wordpress.org/onemorekrishna/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/clarvity-media-replace/)