-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modern Image Formats: Option to delete the original file on upload #1564
Comments
Hey 👋, I'd like to work on this issue! |
Hey Team, Created a PR for this issue: #1606 |
Is this something we want to encourage? By providing a UI control, we send a signal that this is one of the encouraged ways to configure the plugin, and I wonder whether that's justifiable. WordPress Core always keeps the original image, even when it's not used as the More importantly though, why should a Core feature plugin like this provide an option for something that Core doesn't provide an option for? In other words, the decision whether to keep the original image is just as relevant for Core as it is for this plugin, so this plugin doesn't feel like the right place to add an option for this. @JosVelasco I wonder if there's already a filter in WordPress Core to modify the behavior. If not, we may want to introduce one. That would make more sense to me than implementing it in this plugin specifically (which would mean that Core would remain unaffected, leading to inconsistent behavior). @adamsilverstein @westonruter Curious what you think about this. |
I also doubt whether we should facilitate deleting the original file. |
At some point, we are moving from a decisions-not-options paradigm to a more options one; at least, that is what I see with the Site Editor and its more advanced options, like the fonts manager. |
It is fine to add an option in a plugin, but I also question the usefulness/advisability of this feature.
I agree. The original image is considered user data and for that reason we should probably preserve it. If the user installs a new theme with additional image sizes, they may want to generate those sizes for existing uploads. Without the original upload this is not possible. Even if we kept a modern format copy of the original, we wouldn't want to use that as the new source because compression artifacts would become amplified.
If users generate AVIF or WebP instead of JPEG sub sizes we are already saving them significant storage space. Removing the original upload would save additional space, however is that really an issue for users? For users that really want to delete their original uploads, this is already achievable using existing hooks, or using a plugin purpose built for this like https://wordpress.org/plugins/delete-original-image/ I would suggest we close this ticket after some time for additional discussion. |
Hi team:
To save disk space, add an option to the settings to delete the original JPEG / PNG.
The file could also be named filename.avif instead of, for example, filename-jpg.avif.
The downsize that I image could be that for images that need to be .jpg or .png for applications like og:image, you'd have to temporarily turn off the option.
The text was updated successfully, but these errors were encountered: