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

srcset not created when "Generate JPEG files in addition to WebP" enabled #1207

Closed
adamsilverstein opened this issue May 7, 2024 · 4 comments
Labels
[Focus] Images Issues related to the Images focus area [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) [Type] Bug An existing feature is broken

Comments

@adamsilverstein
Copy link
Member

Bug Description

When the "Generate JPEG files in addition to WebP" option is enabled, the HTML output does not include the expected srcset, instead, only the main image is referenced.

Steps to reproduce

  1. Install the modern images feature
  2. enabled the Generate JPEG option under settings->media
  3. upload a jpeg image to a post
  4. check the source code

Expected results: in img tag uses srcset
Actual results: the img tag lags a srcset attribute

Screenshots

Setting:
image

With setting disabled:
image

With setting enabled:
image

Note: I discovered this issue when working to update the plugin to support AVIF: #1176

@adamsilverstein adamsilverstein added [Type] Bug An existing feature is broken [Focus] Images Issues related to the Images focus area [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) labels May 7, 2024
@westonruter westonruter added this to the webp-uploads n.e.x.t milestone May 7, 2024
@adamsilverstein
Copy link
Member Author

Note: the behavior may depend on the size of the original uploaded image, my test image was 3000x2000 pixels.

This was the image I tested with:
My Flower Photo

@mukeshpanchal27
Copy link
Member

Should be punt to next release.

@adamsilverstein
Copy link
Member Author

Posted a fix for this in #1236

@sstopfer sstopfer added [Focus] Images Issues related to the Images focus area [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) and removed [Focus] Images Issues related to the Images focus area [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) labels May 26, 2024
@adamsilverstein
Copy link
Member Author

This was fixed in #73, closing as resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Images Issues related to the Images focus area [Plugin] Modern Image Formats Issues for the Modern Image Formats plugin (formerly WebP Uploads) [Type] Bug An existing feature is broken
Projects
Status: Done 😃
Development

Successfully merging a pull request may close this issue.

4 participants