Skip to content
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

Open
JosVelasco opened this issue Sep 27, 2024 · 6 comments · May be fixed by #1606
Open

Modern Image Formats: Option to delete the original file on upload #1564

JosVelasco opened this issue Sep 27, 2024 · 6 comments · May be fixed by #1606
Labels
[Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) [Type] Enhancement A suggestion for improvement of an existing feature

Comments

@JosVelasco
Copy link

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.

@github-project-automation github-project-automation bot moved this to Not Started/Backlog 📆 in WP Performance 2024 Sep 27, 2024
@westonruter westonruter added [Type] Enhancement A suggestion for improvement of an existing feature [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) labels Sep 28, 2024
@AhmarZaidi
Copy link
Contributor

Hey 👋, I'd like to work on this issue!

@AhmarZaidi AhmarZaidi linked a pull request Oct 18, 2024 that will close this issue
@AhmarZaidi
Copy link
Contributor

Hey Team,

Created a PR for this issue: #1606

@felixarntz
Copy link
Member

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 full size, and I'm not sure we want to break with this pattern. One of the reasons is that many sites need those full-resolution images, e.g. photography sites may want to link to them.

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.

@westonruter
Copy link
Member

I also doubt whether we should facilitate deleting the original file.

@JosVelasco
Copy link
Author

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.
The filter sounds great, tho. I still think most users won’t touch it.

@adamsilverstein
Copy link
Member

At some point, we are moving from a decisions-not-options paradigm to a more options one

It is fine to add an option in a plugin, but I also question the usefulness/advisability of this feature.

I also doubt whether we should facilitate deleting the original file.

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.

To save disk space, add an option to the settings to delete the original JPEG / PNG.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) [Type] Enhancement A suggestion for improvement of an existing feature
Projects
Status: Not Started/Backlog 📆
Development

Successfully merging a pull request may close this issue.

5 participants