• Resolved ilan76

    (@ilan76)


    Hi,

    Is it possible to remove the original image after conversion to WebP? This is important if you want to save server space for large sites.
    This should be added as an option if not already supported…

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hello @ilan76,

    Thanks for your message.

    The plugin does not delete the original files as it should not be done. The original images are always a guarantee of security for your data – if you remove the plugin, everything will return to its original state. Remember that not all browsers support the WebP format.

    Additionally, in the case of AVIF format, the plugin uses original images. It doesn’t convert WebP to AVIF, just original files directly to WebP and AVIF. As a result, the quality of conversion is higher.

    Best,
    Mateusz

    Thread Starter ilan76

    (@ilan76)

    Hi @mateuszgbiorczyk, thanks for your quick reply.

    Yes, I know it’s better to leave the original images if possible but on very large sites with many images & videos, it will be nice to have an option for this to save on storage, as all modern browsers today support WebP.

    I know some other plugins have this option also…

    Thanks

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @ilan76 File security is crucial to me. Consider the situation when someone wants to remove the plugin. Then he loses access to all his files. And I won’t be able to help him because these files won’t exist. Therefore, I do not offer such an option.

    I hear what you say and understand why you don’t auto-delete the JPGs by default but I’m still inclined to save resources on the server. You could add a delete option in the “extra features” section (unselected by default and with appropriate warnings).

    My host caps both disk space and inodes (effectively number of files). WordPress is problematic anyway because it makes copies of each image in multiple dimensions, storing duplicates of all my JPGs as WebP gobbles yet more resources.

    The conversion operation (at 75%) worked well in that it didn’t take long and the new files were close to half the size of the originals. Google speed test went from 94% to 98% The problem is that I’m now using near 50% more storage because I have images in both JPG and WebP formats.

    If I were to download a copy of the /uploads/ folder to my PC (and a keep a backup!) then in the scenario you identify, the plugin being removed, I could copy the uploads folder back.

    Mine is a “hobby” site, I guess if it were commercial I may be more cautious. If I were building from scratch now I’d upload images as WebP anyway as recent versions of Chrome, Safari, Firefox, Edge, and Opera all handle WebP and I don’t think it essential to cater for the laggards.

    As for AVIF, my understanding is that it’s a little less widely supported and doesn’t make files much smaller than WebP (although quality is better so you can turn up the compression without losing quality) so, at least for my hobby site WebP can save me a load of disk – if I delete the jpgs.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @robhindle I understand you perfectly. However, you need to know that a plugin is made for a lot of people. Almost 200,000 users use this plugin.

    I can imagine a situation where someone would check this option in a plugin’s settings and then blame me for not being able to restore the original images. Believe me, I have really encountered many very strange cases.

    That’s why I can’t risk adding such functionality.

    Thanks. Understood. If anyone searches the forum with that question in mind, as I did, they’ll now find this thread and will have a better understanding of the situation i.e. for a commercial/important site best not delete.

    For a personal site like mine, with limited storage, they can delete jpgs to free up space as long as they understand and accept the risks. The risk can be mitigated by keeping backup copies of the uploads folder elsewhere.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @rob1951 If you want to do so, disable the “Automatic removal of files in output formats larger than original” option in the plugin settings and save the plugin settings. Then convert all images by checking the “Force convert all images again” option. And then delete the contents of the /uploads directory. Images in WebP should load without any problems.

    Mateusz Gbiorczyk, congratulations on your answers. I support your position!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Delete original images’ is closed to new replies.