BACK TO DIRECTORY

Kodlo Media Replace

by Kodlo

0.0
(0 ratings)

Need to swap a product photo, an updated PDF price list or a corrected logo without breaking a single link? Kodlo Media Replace overwrites the file of an existing attachment and keeps everything else exactly as it was:

  • the attachment ID,
  • the file name,
  • the URL, including every thumbnail URL.

Pages, products, galleries and page builders that use the file show the new version right away. There is nothing to search and replace.

How it works

Open a file in the Media Library, click Replace file, choose the new file and confirm. That’s it.

What happens behind the scenes

  • All image sizes are rebuilt with the same function WordPress runs for a new upload.
  • Old thumbnail URLs keep working. When the new image has different proportions, thumbnail file names would normally change. The plugin recreates the old ones from the new image at their old dimensions, so URLs hard-coded in posts or page builders never return a 404 error.
  • Large and rotated photos keep their URL (the “-scaled” and “-rotated” files WordPress creates).
  • WebP and AVIF copies made by optimization plugins (photo.jpg.webp, photo.webp) are regenerated, so rewrite rules don’t keep serving the old picture.
  • Browser and CDN caches: on the front end, every URL of a replaced file gets a version parameter (?kmr=…), so visitors download the new file immediately, even if the old one was cached for a year.
  • Page caches are cleared automatically when one of these is active: WP Rocket, W3 Total Cache, LiteSpeed Cache, WP Super Cache, WP Fastest Cache, SiteGround Optimizer, WP-Optimize, Breeze, Hummingbird, Cache Enabler, Nginx Helper, WP Engine, Kinsta, Pantheon.
  • Cloudflare (optional): the replaced file URLs can be purged from the Cloudflare edge. See the FAQ.

Simple by design

No settings page, no ads, no tracking. Works with images, PDF files, video, audio and documents.

The new file must have the same type as the old one (JPG for JPG, PDF for PDF), otherwise the URL would have to change.

External services

This plugin can connect to the Cloudflare API to remove replaced files from the Cloudflare cache. It is off by default and only works after you add a Cloudflare zone ID and API token to wp-config.php (see the FAQ).

When it is enabled, each time you replace a file the plugin sends a request to api.cloudflare.com with your zone ID, your API token and the URLs of the replaced file and its thumbnails (or a “purge everything” request if you enabled that option). No other data is sent.

This service is provided by Cloudflare, Inc.: Terms of Service, Privacy Policy.

Screenshots

The "Replace file" box on the edit screen of a media file.

The "Replace file" box on the edit screen of a media file.

After the replacement: same URL, new image. Old thumbnail URLs keep working even when the proportions change.

After the replacement: same URL, new image. Old thumbnail URLs keep working even when the proportions change.

The "Replace file" link in the Media Library list view.

The "Replace file" link in the Media Library list view.

The "Replace file" button in the media details window (grid view).

The "Replace file" button in the media details window (grid view).

Plugin Details

Active Installs
0
Total Downloads
117
Version
1.0.0
Requires WP
6.0
Requires PHP
7.4
Tested Up To
7.1.4
Added
2026-10-11
Last Updated
2026-10-11 7:10pm GMT

Ratings

5
0
4
0
3
0
2
0
1
0