Skip to content

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

Closed

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

Activity

  1. added this to the 1.0.0 milestone on Apr 8, 2022
  2. self-assigned this
    on Apr 8, 2022
  3. adamsilverstein commented on Apr 8, 2022

    @adamsilverstein
    Member

    as that implementation doesn't even store file sizes for the generated images.

    Note that the current core implementation/patch does include file size (via the new wp_filesize) data. Still I would be in favor of a filter to control the behavior.

    This might be important behavior to include especially after confirming that (especially full sized) WebP versions of JPEG uploads might be larger than the original.

  4. added and removed
    Needs DevAnything that requires development (e.g. a pull request)
    on Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions