Skip to content

When generating WebPs, ensure full size is generated(-scaled for large images) #174

Closed

Description

@adamsilverstein

Bug Description

After #152 "Full"" sized images inserted by users will still use the original jpeg image or (-scaled version for larger images) because the WebP version is not being generated. See #152 (comment).

Proposal to fix:

  • Always generate a full sized WebP version when WebP output is active
  • For larger images (over big_image_size_threshold), generate a -scaled.webp file

Steps to reproduce

  1. Enable webp-uploads
  2. Upload and insert an image, select full size in the image properties sidebar
  3. view the post and check the image source

Expected:

  • All image references are to .webp files

Actual

  • some references are to a .jpg file.

Screenshots

image
image
image

Activity

  1. mitogh commented on Feb 16, 2022

    @mitogh
    Member

    I agree with this behavior, however, the opposite of this behavior was introduced here:

    Closing #122

    Just want to make sure we are consistent with those behaviors moving forward.

  2. felixarntz commented on Feb 21, 2022

    @felixarntz
    Member

    @mitogh #122 was opened based on the current implementation where all sub-sizes are only created in one version (e.g. WebP), while the original image is remaining in the original format (e.g. JPEG).

    But now, given we're working towards keeping JPEG available for all sizes and using WebP in addition, this may still be a relevant issue, it doesn't conflict with #122.

    @adamsilverstein I wonder though whether we should rephrase the purpose of this issue. It wouldn't make sense to me to create a WebP version of the -scaled image if we don't also create a WebP version for the full image if it is small enough. We should either make the decision to only create WebP versions of the sub-sizes or we should make the decision to create WebP versions of the full size as well, no matter whether that full size is a downscaled version (i.e. if the original is too large, as mentioned here) or small enough to not need a downscaled version (i.e. not a "big" image).

  3. adamsilverstein commented on Feb 25, 2022

    @adamsilverstein
    MemberAuthor

    We should either make the decision to only create WebP versions of the sub-sizes or we should make the decision to create WebP versions of the full size as well, no matter whether that full size is a downscaled version (i.e. if the original is too large, as mentioned here) or small enough to not need a downscaled version (i.e. not a "big" image).

    We need the full sized web- to generate correct markup when the user selects a large image, see #152 (comment)

  4. changed the title [-]When generating only WebP sub sizes, ensure WebP `-scaled` is generated and used[/-] [+]When generating WebPs, ensure full size is generated(`-scaled` for large images)[/+] on Feb 25, 2022
  5. adamsilverstein commented on Feb 25, 2022

    @adamsilverstein
    MemberAuthor

    I updated this ticket's title and description to more accurately describe the issue: we need to generate the "Full" sized image as a WebP in all cases (small or large image) when we are generating WebPs. For larger images this is the -scaled image, otherwise its just the original image we need a WebP version of.

  6. felixarntz commented on Feb 25, 2022

    @felixarntz
    Member

    Marking this as Needs Dev - a PR for this can be started anytime, since the dependency of #142 is now completely implemented.

  7. mitogh commented on Feb 26, 2022

    @mitogh
    Member

    Taking over this one as I think I have a good idea of how we can implement it on top of what we already have in place. :)

  8. self-assigned this
    on Feb 26, 2022
  9. removed
    Needs DevAnything that requires development (e.g. a pull request)
    on Feb 28, 2022
  10. added a commit that references this issue on Feb 28, 2022
    3866bec
  11. added this to the 1.0.0-beta.2 milestone on Feb 28, 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

    Sponsor
    SponsoredKunjungi sekarang
    Promo