A while back I posted on 7 Awesome WordPress Plugins and recently talked about a relatively new favourite plugin, WPS Hide Login. Today I’m going to continue on in this vein and discuss another favourite: Enable Media Replace by ShortPixel. It is, per their description, “A free, lightweight and easy to use plugin that allows you to seamlessly replace an image or file in your Media Library by uploading a new file in its place.”
A bit of background
I’ve been creating websites in WordPress for years. Sometimes, when building a new site or updating an existing one, everything goes perfectly smoothly. But often, something you think will be quick and easy turns out not to be so. Case in point: I select a photo to use in a page, upload it to the WordPress media library, insert it within the page, and publish (or save as a draft). Then I look at the live (or preview) of the page and realize I don’t like how the photo looks for some reason. It may not be cropped the way I like, may result in unattractive word wrapping around it (e.g., the dreaded “widow”), or just doesn’t look right. Or perhaps the client looks at the page and changes their mind about the photo for a different reason.
Any of the above scenarios would lead a web developer to remove the image and upload and insert a new one. Oh, and, any descriptive information associated with the image — such as an alt attribute — would need to be re-entered. Not that big a deal. But… if you or the client is still not happy with the photo, you might need to repeat this process again. And maybe again… You get the point. It can be frustrating and time-consuming.
Enter Enable Media Replace Plugin
Just as “there’s an app for that” on mobile devices, there’s usually “a plugin for that” in WordPress. Discovering Enable Media Replace was a revelation for me. It saves me a lot of time and headaches.
After adding and activating the plugin, when you examine an image from your media library, you’ll now notice a section titled “Replace media” and an “Upload a new file” button.
All you need to do is click that button and then browse to the image file you’d like to replace the old one with. You have options to keep the file name the same within WordPress, even if you’re using one with a different name, or to update the file name to the new one, in which case all links to that image will also be automatically updated. You can also keep or change the date associated with the image file.
To some this function may sound trivial, but believe me, if you’ve worked on as many WordPress sites as I have, this makes things so much easier. I wouldn’t be surprised if some day soon, it’s directly built in to WordPress. One can always hope!