-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Image Processing works well when the source image is a png or a jpg, but when it's a webp, blacks and whites appear toned down. At first I wondered if it was a problem similar to #8298, but that issue has to do with non-sRGB images, which is not the case here. My webp is sRGB (unless cwebp is fooling me) and the problem only appears with webp images.
What version of Hugo are you using (hugo version)?
hugo v0.87.0-B0C541E4+extended windows/amd64 BuildDate=2021-08-03T10:57:28Z VendorInfo=gohugoio
Example
Here's a sRGB webp image I want to process. You can clearly see the deep blacks in the trees and the bright clouds.
(How I created this image: I first exported it as a sRGB PNG in Adobe Lightroom then converted it with cwebp. The problem would have been the same if I directly exported the webp with, say, GIMP)
You can download the original here.
Here's the image processed by Hugo with .Resize. No matter the targeted format (webp, png, jpg) or the targeted size, it will always have these muted blacks and whites.
This is 66_hu491b7a84666ef3266e0bfb2f80fb050e_290232_1600x0_resize_q75_h2_linear_2.webp (converted in png so I could upload it on GitHub)

