Enable Media Replace is removing the original files!
Enable Media Replace was designed to easily replace your media files, since this is a functionality that is very demanded. If you notice that your original files are removed when the image is replaced, there are two reasons for that.
There's no backup functionality
This is an expected behaviour. It may seem obvious, but our little plugin was built to simply replace your files. It does not save the previous image in a backup file.
It does not know if there are "other" originals
Enable Media Replace only sees the images that are present in your Media Library. If some specific image was previously converted or edited, and its original version is kept in a backup in a separate location, Enable Media Replace will not know about that. This can cause all sort of issues, including the removal of the "other" originals, and to illustrate this, see the next example with ShortPixel Image Optimizer.
Imagine the following situation:
- You upload a PNG image
- Let it optimize with ShortPixel Image Optimizer (SPIO)
- At the same time, convert it to JPG with ShortPixel as well.
- ShortPixel's backup folder will contain the original PNG
- The Media Library will have the optimized and converted JPG
Since Enable Media Replace doesn't know that the file was originally a PNG, if you use the option "Just replace the file", the following situation can happen:
- You try to replace your file with a new PNG (remember, on WordPress we have a JPG converted from a PNG) with the option "Just replace the file".
- Your new file will still be a JPG, but in reality it is a PNG. That results in a corrupted file.
- ShortPixel Image Optimizer removes all backups when the image is replaced, which is intended behaviour. That means the original pre-replacement PNG backup will be removed.
- ShortPixel will optimize the file and save as a new backup the corrupted JPG.
The previous situation could've been avoided if the option "Replace the file, use new file name and update all links" was used.