techlist.io

Image Compression

3 posts

Discord2026-01-142 min readCurated summary

How to Make and Use Custom Emoji on Discord

Discord custom emojis are small images communities can upload and use in messages, reactions, and custom statuses. They are stored per server, though Discord Nitro allows broader use across servers. Uploading is now flexible because Discord can resize and compress images, while usage is mainly limited by server permissions, subscription requirements, and Discord’s content policies. ## What Custom Emojis Are - Custom emojis are community-created images used like standard emojis. - They can appear in: - Messages - Reactions - Custom status messages - They add personalized expressions, jokes, symbols, and artwork to Discord conversations. ## Adding Custom Emojis - Upload emojis through **Server Settings > Emoji**. - Eligible users may also upload directly from the emoji picker. - Emojis belong to the server where they are uploaded. - To use them in other servers, users must upload them separately or have Discord Nitro. ## File Requirements and Uploading - Discord now automatically resizes and crops uploaded images. - Supported formats include: - JPEG - PNG - GIF - WEBP - AVIF - Recommended specifications are: - Up to **256 KB** - **128×128 pixels** - A name of at least two characters - Larger files can be compressed automatically. ## Animated Emojis and Content Rules - Animated emojis are uploaded through the same process as static emojis. - They appear in a separate animated-emoji section. - Using newly uploaded animated emojis requires Discord Nitro. - Emojis must comply with Discord’s Community Guidelines and Terms of Service. - Emojis cannot contain age-restricted material such as graphic violence or adult content. - Uploaders must also have the rights to use the images. ## Larger “Jumbo” Emojis - Emojis appear larger when a message contains only emojis and no regular text. - Up to **27 emojis** can remain enlarged in one message. - Messages containing more than 27 emojis revert to the normal display size. ## Server Emoji Limits - A standard server supports: - 50 static custom emojis - 50 animated custom emojis - Boosted servers receive larger limits: - Level 1: 100 static and 100 animated emojis - Level 2: 150 of each - Level 3: 250 of each - These limits apply to the entire server, regardless of which member uploads the emojis. Custom emojis are easiest to create when users take advantage of Discord’s built-in resizing tools, while server owners should monitor shared emoji limits and ensure all uploads comply with Discord’s policies.

Discord2025-03-163 min readCurated summary

Modern Image Formats at Discord: Supporting WebP and AVIF

Discord modernized its image pipeline to support animated WebP and AVIF attachments, embeds, and emojis. The change improves animation quality while significantly reducing file sizes compared with GIFs. Discord chose WebP as its primary delivery format because it offers broader platform support and more predictable performance, while converting AVIF sources—including tone-mapping HDR images to SDR when necessary. ## Benefits of WebP and AVIF - **Better transparency:** Both formats support full alpha channels, allowing smooth edges and animations that blend naturally with Discord’s light and dark themes. - **Greater color depth:** - GIF supports only 256 colors. - WebP supports roughly 16 million colors through 8-bit color channels. - AVIF supports up to 12 bits per channel. - **Improved visual quality:** Higher color fidelity reduces banding, produces more accurate colors, and better supports photographic and HDR content. - **Smaller animations:** Modern video-style compression provides: - Inter-frame compression - Advanced prediction - Configurable quality levels - Millisecond-precise frame timing - In the example provided, a GIF was **302 KB**, while the equivalent WebP animation was **43 KB**. ## Cross-Platform Image Processing - Discord processes and resizes every attached or embedded image to provide consistent behavior across: - Web browsers - Windows, macOS, and Linux - iOS - Android - Supporting new formats required coordinating inspection, conversion, decoding, and rendering throughout the media infrastructure. - Discord selected WebP as its preferred transformation target because it offers: - Near-universal platform support - Faster encoding and decoding than AVIF - Mature tools and ecosystem support - More predictable performance ## Tradeoffs Between WebP and AVIF - WebP is less capable than AVIF for: - 10- or 12-bit color - HDR content - Maximum compression efficiency - AVIF can produce smaller files for some content, but its platform support and performance are less consistent. - Discord converts AVIF images to WebP while preserving as much visual quality as possible. - HDR AVIF sources are tone-mapped to SDR because WebP is limited to 8-bit color depth. ## iOS Decoding Challenges - Discord uses SDWebImage to render images on iOS. - Its default WebP implementation relies on Apple’s ImageIO framework, available in iOS 14 and later. - Testing revealed that ImageIO decoded animated WebP files with increasingly inconsistent timing, especially for large or frame-heavy animations. - In a 10-second 480p30 comparison: - `libwebp` decoded the animation in real time. - ImageIO fell more than three seconds behind, with the delay increasing throughout playback. Discord’s move to WebP and AVIF demonstrates how modern formats can deliver higher-quality animations with substantially smaller files. For broad compatibility and reliable playback, WebP serves as the practical default, while AVIF remains useful as a high-efficiency source format.