Skip to content

Only use smaller file size based on opt-in since it is not part of the core feature scope #286

@felixarntz

Description

@felixarntz

Follow-up to #186: While this enhancement certainly makes sense here, we need to consider that the WebP by default implementation for WordPress core as of now is not going to select the smaller file size, as that implementation doesn't even store file sizes for the generated images.

Due to this, I would advise we make this enhancement opt-in at this point, since otherwise it would explicitly behave differently from the core implementation, which to a degree would defeat the primary purpose of this plugin which is testing future core features. It may be that we eventually decide to add this to the core implementation, at which point we could change it to be enabled by default here as well, but right now this is clearly different behavior, so I think we should keep this piece as opt-in.

I suggest we add a filter to enable it, e.g. webp_uploads_prefer_smaller_file.

cc @jjgrainger @mitogh @adamsilverstein

Metadata

Metadata

Assignees

Labels

[Plugin] Modern Image FormatsIssues for the Modern Image Formats plugin (formerly WebP Uploads)[Type] EnhancementA suggestion for improvement of an existing feature

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions