Webp support for image upload

Hi, whenever I try to upload a webp image, I get an error message here

Sorry, the file you are trying to upload is not authorized (authorized extensions: jpg, jpeg, png, gif, pdf, csv, gz, json, svg, mp4, txt, docx, mov, tex, zip, webm).

I tried using a webp image on one of the Discourse forums out there and they said Discourse does not support webp as an image format we can upload. Any chance that will change ?

I ask because the quality is very poor when we use an animation in GIF format. webp allows lossless animation. Thanks.

If You’re the admin, to allow WebP uploads is to add it to authorized_extensions in admin > settings > files

2 Likes

Thanks. What happens when someone clicks on it ? Will we be able to embed it in the post ?

1 Like

The info provided above allows for users to upload webp images in composer. Any user on your forum will be able to upload webp images without receiving the not authorized error.

3 Likes

WebP has some problems…

https://caniuse.com/#feat=webp

Mainly zero iOS support, I guess.

2 Likes

I see. Let us put the fault on Apple :slight_smile:

PS : I tried asking on many graphics forums. Looks like webp is the only viable method to add a GIF like lossless animation in a browser.

1 Like

https://github.com/discourse/discourse/commit/32e7ee4867e3ea557ea5e55886b9b94a624b2c30

talking bart simpson GIF

:+1:

4 Likes

Yes, with Firefox adding support Jan 2019 and Safari last September, and it being very useful for Discourse Gifs component, I worked on adding support for it on the main places in Discourse.

We still fail to resize animated images (like if you want to use an animated webp avatar), but it works fine as a the standard post upload.

It’s a really good format for lossy/lossless animated images, with most of the gains of video-gifs without most of the downsides.

6 Likes