{"id":375590,"date":"2026-10-08T14:31:49","date_gmt":"2026-10-08T14:31:49","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/replace-image-in-media-library\/"},"modified":"2026-10-08T14:31:26","modified_gmt":"2026-10-08T14:31:26","slug":"clarvity-media-replace","status":"publish","type":"plugin","link":"https:\/\/hau.wordpress.org\/plugins\/clarvity-media-replace\/","author":20975907,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.3","requires":"6.2","requires_php":"7.4","requires_plugins":null,"header_name":"Clarvity Media Replace","header_author":"Krishna Sagar | <a href=\"https:\/\/clarvity.com\/\">Clarvity Digital<\/a>","header_description":"Replace any image directly from the WordPress Media Library without navigating to the specific page or post where the image is used.","assets_banners_color":"7f71ec","last_updated":"2026-10-08 14:31:26","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":74,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"onemorekrishna","date":"2026-10-08 14:31:26","revision":3734853}},"upgrade_notice":{"1.0.0":"<p>First release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3734903,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3734903,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3734903,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3734903,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[1346,163,84,233,158820],"plugin_category":[50],"plugin_contributors":[285061],"plugin_business_model":[],"class_list":["post-375590","plugin","type-plugin","status-publish","hentry","plugin_tags-attachments","plugin_tags-images","plugin_tags-media","plugin_tags-media-library","plugin_tags-replace-image","plugin_category-media","plugin_contributors-onemorekrishna","plugin_committers-onemorekrishna"],"banners":{"banner":"https:\/\/ps.w.org\/clarvity-media-replace\/assets\/banner-772x250.png?rev=3734903","banner_2x":"https:\/\/ps.w.org\/clarvity-media-replace\/assets\/banner-1544x500.png?rev=3734903","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/clarvity-media-replace\/assets\/icon-128x128.png?rev=3734903","icon_2x":"https:\/\/ps.w.org\/clarvity-media-replace\/assets\/icon-256x256.png?rev=3734903","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>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 <strong>Replace Image<\/strong>, choose the new one, and confirm. Every place that used the old image now shows the new one.<\/p>\n\n<p><strong>How it works<\/strong><\/p>\n\n<p>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.<\/p>\n\n<p><strong>Features<\/strong><\/p>\n\n<ul>\n<li>A \"Replace Image\" button in the Attachment details sidebar (grid view), the Edit Media screen and the list-view row actions.<\/li>\n<li>Pick an existing library image or upload a new one, using the familiar media window.<\/li>\n<li>A confirmation prompt showing the current and new images side by side, where the image is used, and a required \"I understand\" checkbox.<\/li>\n<li>Keep the current filename (links stay identical) or use the new file's name.<\/li>\n<li>Changing file type (for example JPG to PNG or WebP) is supported; links are updated for you.<\/li>\n<li>Serialization-safe URL updates in post content, excerpts, custom fields, term meta and settings, including Elementor's JSON data.<\/li>\n<li>Automatic rollback: if anything fails, the original files and data are restored.<\/li>\n<li>Optional clean-up of the replacement's own library entry when it isn't used anywhere.<\/li>\n<li>Loads nothing on the front end, and in wp-admin only on screens that already load the media window.<\/li>\n<\/ul>\n\n<p><strong>Privacy<\/strong><\/p>\n\n<p>This plugin does not collect data, set cookies, or contact any external service.<\/p>\n\n<h3>Usage<\/h3>\n\n<ol>\n<li>Go to <strong>Media \u2192 Library<\/strong> and click an image.<\/li>\n<li>In the Attachment details sidebar, click <strong>Replace Image<\/strong>. (In list view, hover the image row and click <strong>Replace Image<\/strong>.)<\/li>\n<li>Choose the new image from the library, or open the <strong>Upload files<\/strong> tab to upload one, then click <strong>Use this image<\/strong>.<\/li>\n<li>Review the confirmation prompt: both images, where the current one is used, and the filename options.<\/li>\n<li>Tick <strong>I understand\u2026<\/strong> and click <strong>Replace Image<\/strong>.<\/li>\n<li>If you use a page cache or CDN, clear it so visitors see the new image straight away.<\/li>\n<\/ol>\n\n<p>By default, Editors and Administrators can replace images (it needs the <code>upload_files<\/code> and <code>edit_others_posts<\/code> capabilities), because a replacement changes content across the whole site.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>In wp-admin go to <strong>Plugins \u2192 Add New \u2192 Upload Plugin<\/strong>, choose <code>clarvity-media-replace.zip<\/code> and click <strong>Install Now<\/strong>. (Or unzip it into <code>\/wp-content\/plugins\/<\/code>.)<\/li>\n<li>Click <strong>Activate<\/strong>.<\/li>\n<li>There are no settings. Go to <strong>Media \u2192 Library<\/strong> to use it.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"will%20this%20break%20my%20links%3F\"><h3>Will this break my links?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"how%20are%20featured%20images%2C%20galleries%20and%20custom%20fields%20handled%3F\"><h3>How are featured images, galleries and custom fields handled?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"what%20if%20the%20new%20image%20has%20a%20different%20shape%20or%20is%20smaller%3F\"><h3>What if the new image has a different shape or is smaller?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"what%20if%20something%20goes%20wrong%20halfway%3F\"><h3>What if something goes wrong halfway?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"can%20i%20undo%20a%20replacement%3F\"><h3>Can I undo a replacement?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20images%20stored%20in%20the%20cloud%20%28s3%2C%20etc.%29%3F\"><h3>Does it work with images stored in the cloud (S3, etc.)?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"why%20is%20some%20data%20left%20unchanged%3F\"><h3>Why is some data left unchanged?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"can%20developers%20extend%20it%3F\"><h3>Can developers extend it?<\/h3><\/dt>\n<dd><p>Yes:<\/p>\n\n<ul>\n<li><code>clarvity_mr_required_capability<\/code> (filter): the capability needed to replace images. Default <code>edit_others_posts<\/code>.<\/li>\n<li><code>clarvity_mr_url_pairs<\/code> (filter): the old =&gt; new URL paths about to be applied.<\/li>\n<li><code>clarvity_mr_replacement_targets<\/code> (filter): the tables and columns searched for URLs.<\/li>\n<li><code>clarvity_mr_image_replaced<\/code> (action): fires after a replacement, with the attachment ID, the replacement's ID and the URL pairs. Useful for purging caches.<\/li>\n<\/ul><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release.<\/li>\n<\/ul>","raw_excerpt":"Replace any image directly from the WordPress Media Library without navigating to the specific page or post where the image is used.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hau.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/375590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hau.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/hau.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/hau.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=375590"}],"author":[{"embeddable":true,"href":"https:\/\/hau.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/onemorekrishna"}],"wp:attachment":[{"href":"https:\/\/hau.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=375590"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/hau.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=375590"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/hau.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=375590"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/hau.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=375590"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/hau.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=375590"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/hau.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=375590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}