- Issue created by @pcate
- 🇮🇳India Meeni_Dhobale
Hi @PCate,
I tried the module with the png images, but I noticed that when I use a PNG image, it is already converted as PNG. Maybe I am looking somewhere else so I do not understand what you are trying to say. If you can provide some more context on it then it will be very helpful. - 🇺🇸United States pcate
@Meeni_Dhobale, sorry for taking so long to reply.
I've had time to go back and review the issue and I'm still encountering it.
Below is the output markup I'm seeing for a uploaded PNG image:
<img srcset="/sites/default/files/styles/card/public/images/d1ab12eac7bb/test-file.png.webp?itok=86uRvFUt 1x" width="480" height="270" src="/sites/default/files/styles/card/public/images/d1ab12eac7bb/test-file.png.jpg?itok=86uRvFUt" alt="A test image">
As you can see the main
srcset
attribute uses the correctly generated WEBP image, but the fallback has converted the PNG image to a JPG file.Briefly looking at the module code at: https://git.drupalcode.org/project/wpf/-/blob/1.0.x/src/ImageFactory.php and https://git.drupalcode.org/project/wpf/-/blob/1.0.x/src/ImageFactoryInte... I see no code which handles using or generating PNG fallbacks.
- 🇭🇺Hungary dj1999
It is good enough me the fallback image in jpg format but waiting for patches if somebody needs an other fallback format.
- Status changed to Closed: works as designed
9 months ago 6:52am 10 July 2024