Hi,
Overwriting can’t be an option: it might be a (big) mistake to do so most of the time. Adding a modal asking for overwriting would also be quite some work, for a feature that was also never asked (and even more difficult in the bulk process, that is usually run overnight and shouldn’t have any popups).
You can add this option for yourself, but I am not sure it would be good to have this in the native plugin, or maybe I missed the point? 🙂
I worked with a lot of optimizer plugin but I am not sure why it would be a problem to keep the original file somewhere and to work with different names files, Renamer has always worked with EWWW for example, that does that.
Hi,
thanks for the answer. Perhaps I am the only one with this need?
The problem with optimizing plugin is, while it keeps original file intact, it renames the optimized image files by adding prefix before the filename. Apparently, this is not good for the SEO, and my client wants the image file names without prefixes.
Perhaps overwriting is not an good idea, but maybe renaming original file before the renaming process starts is an better one? If rename process fails without a message to the user why, like it does now, is also not an good idea 🙂
I just discovered by looking at your code that output should be placed at log file media-file-renamer.log in plugins directory. However, there is no such file created in my case. I also discovered there should be a message in the log file if renaming fails due to already existing filename: “The new file already exists ($new_filepath). It is not a case issue. Renaming cancelled.”
I also discovered there is a filter “mfrh_force_rename” that should forcefully rename even if the file exists. This could solve my problem.
I am still wondering why logging does not work.