Colour issue when image processing applied to webp

I’ve noticed that webp format seems to suffer (the colours look washed out most noticeable with greys and white) when processed (Fit, Resize etc.) is this a known issue.

The image appears in multiple places at different sizes and I’d also like to create an src-set using Resize. Its not essential for this project as I can preprocess the images rather than use $image.Resize but it would be useful to know for future reference so any feedback/insight would be greatly appreciated.

Not completely convinced with webp yet.

Thanks

Preprocessed image at 1600x900 colours are crisp

Image processed with Hugo image a 3200x1600 image is resized to 1600x900 and quality is set to 100 with q100
$image.Resize “1600x900 q100”

There’s a known issue when decoding webp images, but that does not fit into your description (I assume your source is not webp).

Maybe this issue?

The source is a webp thats why I was slightly confused as all I was trying with image is a resize no change in format. I will look at the test page and dig into the docs more. Thank you

Yes, then that’s a known and unfortunate issue. We use a native Webp encoder (libwebp), but Go’s native decoder, which has this issue:

I have done some pretty extensive testing on Hugo’s webp support and I would say that it works pretty goo, assuming

  • your source is not webp
  • and, if JPEG, you save it as sRGB (which I suspect is the default for most image editing software) and not some exotic color profile
2 Likes

Ah OK, thanks for the clarification. That’s interesting.