Accept more file extensions for emojis (jpg, webp...)

Currently, there’s a client-side authorized extensions via accept=".png,.gif".

Editing accept=".png,.gif" in our browser allows uploads of other formats, including animated webp, which is nice since there support alpha transparency.

The authorized emojis extension can’t circumvent the authorized uploads extensions from the site settings (jpg, jpeg, png, gif, heic, heif, webp by default).

My suggestion is to expand the authorized formats in the emoji selector.

Would a PR be accepted?

6 Likes

What are the most compact extensions that Discourse supports?

1 Like

As an update, other formats than gif and png aren’t on the roadmap right now.

I don’t think we want any other image formats here other than .png or .gif though, custom emojis are quite specific and we don’t want larger formats like tiff, heic etc.

From DEV: Expand custom emojis allowed image types by Canapin · Pull Request #23457 · discourse/discourse · GitHub

It depends on the image. As a single example, depending on what an image contains, it can be larger in JPG than in PNG and vice-versa.

sadness, a webm and webp would be so revolutionary

1 Like