Can't generate JPG fallback images if WebP was the original image format

Created on 17 August 2022, about 2 years ago
Updated 26 January 2023, over 1 year ago

Problem/Motivation

Steps to reproduce

1. Enable wpf module
2. Add Convert: WEBP to image styles
3. Set available file formats for an image field to "png, gif, jpg, jpeg, webp"
4. set Responsive image as formatter for the image field.
5. create content, upload a WEBP image
6. inspect the generated img srcset links:

<picture>
   <source srcset="
      /sites/default/files/styles/max_325x325/public/2022-08/img-WEBP_0.webp?itok=k9LZtkJT 325w,
      /sites/default/files/styles/max_650x650/public/2022-08/img-WEBP_0.webp?itok=wkqxhxbC 650w,
      /sites/default/files/styles/max_1300x1300/public/2022-08/img-WEBP_0.webp?itok=1_K8DVay 1024w" 
      type="image/webp" 
      sizes="(min-width: 1290px) 1290px, 100vw">
   <img srcset="
      /sites/default/files/styles/max_325x325/public/2022-08/img-WEBP_0.webp?itok=k9LZtkJT 325w,
      /sites/default/files/styles/max_650x650/public/2022-08/img-WEBP_0.webp?itok=wkqxhxbC 650w,
      /sites/default/files/styles/max_1300x1300/public/2022-08/img-WEBP_0.webp?itok=1_K8DVay 1024w" 
      sizes="(min-width: 1290px) 1290px, 100vw"
      src="/sites/default/files/styles/max_325x325/public/2022-08/img-WEBP_0.webp?itok=k9LZtkJT" 
      alt="img" typeof="foaf:Image">
</picture>

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΈπŸ‡°Slovakia kaszarobert

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024