-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[docs] Document WebP support for emoji requests #7568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fixes #7567 - Add information about supported emoji upload formats - Explain that all emoji formats can be served as WebP - Recommend WebP for maximum performance and compatibility - Document how to request still and animated WebP emojis
Would also be good if this was added as an asterisk/note on the CDN Endpoints table |
- Add AVIF to supported image formats - Add AVIF to supported Custom Emoji formats - Include emoji format information and WebP recommendations in footnotes
docs/resources/emoji.mdx
Outdated
@@ -110,6 +116,10 @@ Create a new emoji for the guild. Requires the `CREATE_GUILD_EXPRESSIONS` permis | |||
Emojis and animated emojis have a maximum file size of 256 KiB. Attempting to upload an emoji larger than this limit will fail and return 400 Bad Request and an error message, but not a [JSON status code](/docs/topics/opcodes-and-status-codes#json). | |||
::: | |||
|
|||
:::info | |||
We highly recommend requesting emojis as WebP for maximum performance and compatibility. See the Emoji Formats section above for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: "Emoji Formats" have it link to the header above, so it's easy to get to.
We highly recommend requesting emojis as WebP for maximum performance and compatibility. See the Emoji Formats section above for more details. | |
We highly recommend requesting emojis as WebP for maximum performance and compatibility. See the [Emoji Formats](#emoji-object-emoji-formats) section above for more details. |
docs/resources/emoji.mdx
Outdated
@@ -30,6 +30,12 @@ An emoji cannot have both subscription roles and non-subscription roles. | |||
Emojis with subscription roles are considered premium emoji, and count toward a separate limit of 25. | |||
Emojis cannot be converted between normal and premium after creation. | |||
|
|||
###### Emoji Formats | |||
|
|||
Emojis can be uploaded as JPEG, PNG, GIF, WebP, and AVIF formats. All emojis (regardless of original format) can be served as WebP. We highly recommend that developers request emojis as WebP for maximum performance and compatibility. The Discord client uses WebP for all emojis displayed in-app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than "request" emoji, should it be "submit emoji" (across the board)?
"request" feels like you are asking someone to submit something to me. Unless I'm missing a chunk of context, which is possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is referring to fetching the images that already exist, not uploading new emoji
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a silly question, since I don't know this area as well as others -- how are you requesting the emoji? Is there an API for requesting an emoji from somewhere? (that's what it reads like to me).
If not, I'd lean more towards something like:
Emojis can be uploaded as JPEG, PNG, GIF, WebP, and AVIF formats. All emojis (regardless of original format) can be served as WebP. We highly recommend that developers request emojis as WebP for maximum performance and compatibility. The Discord client uses WebP for all emojis displayed in-app. | |
Emojis can be uploaded as JPEG, PNG, GIF, WebP, and AVIF formats. All emojis (regardless of original format) can be served as WebP. We highly recommend that developers choose WebP emoji for maximum performance and compatibility. The Discord client uses WebP for all emojis displayed in-app. |
Since that clears any ambiguity. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right that the wording is ambiguous. 'Request' here refers to when developers fetch emoji (GET
requests), not when they upload them. I'll update the text to: 'We highly recommend that developers use the .webp
extension when fetching emojis so they're rendered as WebP for maximum performance and compatibility.' This makes it clear we're talking about the file extension used when retrieving existing emojis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻 love it. LGTM!
Welp, looks like it fails on the #emoji-object-emoji-formats
🤔 I wonder why that is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...and you worked it out faster than I did. Full links required. [Emoji Formats](/docs/resources/emoji#emoji-object-emoji-formats)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
Summary
Fixes #7567