From babf6b39274a5f75eee66ebdff00c7a7e4c17a11 Mon Sep 17 00:00:00 2001 From: spenhand Date: Wed, 12 Aug 2026 08:03:10 -0700 Subject: [PATCH] Clarify accepted image-data formats (emoji also accepts WebP/AVIF) The Image Data section stated the Data URI "supports JPG, GIF, and PNG formats" without qualification, which contradicts the Emoji Formats section (emoji accept JPEG, PNG, GIF, WebP, and AVIF) and the actual API behavior, where the accepted format is determined per-resource from the encoded image bytes rather than from the declared content type. Note that some resources accept additional formats and point readers to the specific resource. Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/reference.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference.mdx b/docs/reference.mdx index ba45347ba3..d249995c1a 100644 --- a/docs/reference.mdx +++ b/docs/reference.mdx @@ -377,13 +377,13 @@ Sticker GIFs do not use the CDN base url, and can be accessed at `https://media. ## Image Data -Image data is a [Data URI scheme](https://en.wikipedia.org/wiki/Data_URI_scheme) that supports JPG, GIF, and PNG formats. An example Data URI format is: +Image data is a [Data URI scheme](https://en.wikipedia.org/wiki/Data_URI_scheme) carrying a base64-encoded image. Most endpoints accept JPG, GIF, and PNG; some accept additional formats — for example, [emoji](/docs/resources/emoji#emoji-object-emoji-formats) also accept WebP and AVIF. Refer to the specific resource for the formats it supports. An example Data URI format is: ``` data:image/jpeg;base64,BASE64_ENCODED_JPEG_IMAGE_DATA ``` -Ensure you use the proper content type (`image/jpeg`, `image/png`, `image/gif`) that matches the image data being provided. +The accepted format is determined from the encoded image data itself, so you should set a content type (`image/jpeg`, `image/png`, `image/gif`, etc.) that matches the image being provided. ### Signed Attachment CDN URLs