画像アップロードへのWebp対応

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

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

「いいね!」 1

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

WebP has some problems…

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

Mainly zero iOS support, I guess.

「いいね!」 2

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

talking bart simpson GIF

:+1:

「いいね!」 4

はい、Firefox が 2019 年 1 月に、Safari が昨年 9 月にそれぞれ対応したこともあり、Discourse Gifs コンポーネントにとって非常に有用であるため、Discourse の主要な箇所でこのフォーマットへの対応を実装しました。

まだ、アニメーション画像のリサイズ(例:アニメーション WebP アバターの使用など)には対応できていませんが、標準的な投稿アップロードとしては問題なく動作します。

このフォーマットは、動画 GIF のメリットの多くを享受しつつ、その欠点の多くを回避できる、優れたロス/ロスレス対応のアニメーション画像形式です。

「いいね!」 7