3

Sitecore not allowing WebP image to attached in an image field. Can anyone suggest how to enable that feature so that we can attached webP format image

2 Answers 2

3

WebP format is not (yet) supported in Sitecore out of the box.

Note that WebP format is not supported in all browsers. WebP should really be generated at runtime and cached. Also you need to check the http accept header for "image/webp" to be know if the browser supports it.

You can upgrade Sitecore with the Kam Figy's Dianoga module https://github.com/kamsar/Dianoga in order to support webP. In your media lib, you still upload normal images like jpeg, gif, png. But at runtime they are converted to WebP for supporting browsers.

3
  • 1
    note: The current 4.0 version of Dianoga contain some WebP related bugs, be careful Commented Jul 11, 2019 at 7:26
  • If i use file datatype for pulling webP images, will it have a bade effect on code? Commented Jul 11, 2019 at 8:07
  • Add below and try <param desc="Allowed extensions (comma separated)">webp</param> Commented Aug 7, 2020 at 12:14
1

By default, the media library does not support modern image formats such as WebP. I have written a blog to enable Sitecore cms to upload webp images.

https://mastersitecore.blogspot.com/2022/02/how-to-upload-webp-image-in-sitecore-cms.html

1
  • I see that many people faced issue using your implementation. I am facing the same issue mentioned below: Exception: System.ArgumentException Message: Parameter is not valid. Source: System.Drawing at System.Drawing.Image.FromStream(Stream stream, Boolean ..... Were you able to resolve this issue? Are you using any third party library to integrate webp into Sitecore?
    – Pawan
    Commented 2 days ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.