Replacing Media

Enable Media Replace is a WordPress plugin made by ShortPixel that sells itself on the rhetorical question asking whether you find it tedious to have to delete a media file before uploading another replacement file with the same name.

The first option offered is to replace the file with a file of the same type and name. The second option is to replace the file with a new file with a new name, in which case the plugin updates all the links.

Deleting a media file before adding another with the same name is hardly an onerous task. But if I were to want to swap a file out with one of the different name, then I can see the value in the ability of the plugin to change the links. And if I had 50 files to swap out then I could definitely see the benefit.

From the ShortPixel site

Q: In Enable Media Replace the image isn’t replaced. Why?

A: Almost always the image/file is actually replaced when using Enable Media Replace (EMR) but because of cache the new image/file cannot be seen.
It’s very easy to check whether that’s your case by trying to directly access the URL of an image after adding “?anything” at the end of the URL. Please, note that after “?” you can add any random string you want and this trick is used to bypass any caching from your browser to the file.

On the Support page for the plugin I asked:

If I change media files using the plugin, is it then OK to delete the plugin, or does the plugin need to be active after using for the swap to continue working?

The developer replied and said “You can delete the plugin when you don’t need it anymore. When you replace a file, it is done forever.”