Mastodon: webp support

Created on 11 Aug 2018  路  11Comments  路  Source: tootsuite/mastodon

Supporting webp files would allow people to send and download images faster and those who store pictures in this format wouldn't be forced to convert it before posting.

suggestion

Most helpful comment

Firefox supports webp now.

Place where this is currently a practical problem in Mastodon: trying to share an animation from giphy. They used to serve either gif or mp4, but now they prefer webp if they detect support. You can download webp animations from giphy, but Mastodon won't accept them. Now the fediverse doesn't get to enjoy my coffee gifs in the morning.

All 11 comments

WebP is still only natively supported in the Blink engine (Chrome, Opera, etc).

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

Supporting it properly would mean auto-conversion and serving the right file based on browser (or other client), similar to how sites handle the mishmash of supported

I could whitelist webp with conversion to png, but you will lose the benefits of webp because as the above post mentions, support for webp is still very lacking and we cannot do content negotiation like that.

There are polyfills allowing to display webp images in browsers that don't naively support it. No conversion needed.
@BillyWM @Gargron
https://github.com/FallingSnow/webp-polyfill

There are hundreds of apps this would possibly break compatibility with because suddenly everyone has to get a webp polyfill for their platform.

@Gargron Android supports webp naively, but apps on iOS, desktop and ones using different libraries etc. might be indeed a problem, even if not a huge one.

Well, it's up to you to decide.

FYI, Edge 18 now supports WebP and Firefox just announced that it also will.

We may still skip WebP for AVIF, the next generation image format, though.

@saschanaz

FYI, Edge 18 now supports WebP and Firefox just announced that it also will.

Nice, I can finally use webp on the web, without worrying, people might have problems seeing it.

We may still skip WebP for AVIF, the next generation image format, though.

I'd love to see options for as many formats as possible, but for now webp has advantage of being widely supported.

The current key problem is that Apple hasn't announced its position, so we still have to worry about it 馃槶

Firefox supports webp now.

Place where this is currently a practical problem in Mastodon: trying to share an animation from giphy. They used to serve either gif or mp4, but now they prefer webp if they detect support. You can download webp animations from giphy, but Mastodon won't accept them. Now the fediverse doesn't get to enjoy my coffee gifs in the morning.

Subway Tooter already allows WebP translarent proxy.
ST appends HTTP Accept header Accept: image/webp,image/*,*/*;q=0.8.

the server can check Accept header of client request and use WebP if it's allowed.

@saschanaz Chrome and Firefox are shipping AV1 decoders now, so you could probably polyfill with that (by unpacking the AVIF/HEIC container, putting it in a container supported by the video decoders, and playing that into a canvas).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

psychicteeth picture psychicteeth  路  3Comments

svetlik picture svetlik  路  3Comments

lauramichet picture lauramichet  路  3Comments

sorin-davidoi picture sorin-davidoi  路  3Comments

selfagency picture selfagency  路  3Comments