<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Jack's GIF Notes]]></title><description><![CDATA[Jack's GIF Notes]]></description><link>https://jacktinygif.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 22 Nov 2026 16:13:53 GMT</lastBuildDate><atom:link href="https://jacktinygif.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Why GIFs are so big — and the four things that actually shrink them]]></title><description><![CDATA[GIFs get large because each frame is a 256-colour bitmap, not a video. Here are the levers that actually shrink them.]]></description><link>https://jacktinygif.hashnode.dev/why-gifs-are-so-big</link><guid isPermaLink="true">https://jacktinygif.hashnode.dev/why-gifs-are-so-big</guid><category><![CDATA[discord]]></category><category><![CDATA[image optimization ]]></category><category><![CDATA[webdev]]></category><category><![CDATA[gif]]></category><category><![CDATA[compression]]></category><dc:creator><![CDATA[Jack]]></dc:creator><pubDate>Thu, 19 Nov 2026 04:05:10 GMT</pubDate><content:encoded><![CDATA[<p>A short looping clip looks harmless. Then the file lands at several megabytes, Discord rejects it as an emoji, and the usual advice — "just lower the quality slider" — either barely moves the size or turns the animation into mush.</p>
<p>The slider is the wrong first move. A GIF is not a small video. It is a stack of indexed-colour pictures, packed with a 1980s compression scheme, and the file grows with every extra pixel and every extra frame. Once you treat it that way, the levers that actually shrink it become obvious, and you can spend the quality you can afford on the limit that actually applies.</p>
<p>I built <a href="https://tinygif.app/gif-compressor">TinyGIF</a> around those levers. The rest of this post is the reasoning, not a tour of the site.</p>
<h2>A GIF is a flipbook, not a video</h2>
<p>Video formats such as MP4 spend most of their budget describing <em>how this frame differs</em> from earlier ones, with modern motion compensation and a wide colour range. A GIF does not work like that.</p>
<p>Each frame is an 8-bit paletted image: <strong>at most 256 colours</strong>, chosen from a local or global palette. Those pixels are then compressed with LZW, a general-purpose dictionary coder from the late 1980s. LZW is lossless and respectable at flattening runs of identical pixels, but it is not a video codec. Soft gradients, film grain and camera motion give it very little to work with, so the bytes add up fast.</p>
<p>Animation support is real, just limited. A GIF can store only the pixels that changed from the previous frame (by painting them over a transparent "no change" colour, often called frame differencing). That helps a lot when a character blinks on a flat background. It helps much less when the whole canvas is moving.</p>
<p>There is also no audio, and there is no inter-frame transform that can "make the motion cheaper" the way H.264 can. If you need a long, photographic clip in a chat that accepts video, a short MP4 is usually the smaller file. Keep the GIF for the places that still require one: custom emoji, stickers, some banners, and other upload forms that ask for a GIF specifically.</p>
<h2>The four levers, in a sensible order</h2>
<p>Almost every "make this GIF smaller" tool is turning the same four knobs. The order matters, because some of them cost almost no visible quality and some of them cost a lot.</p>
<h3>1. Dimensions, or crop first</h3>
<p>Pixel count is the biggest term in the file size. Halving both the width and the height leaves about <strong>one quarter</strong> of the pixels in each frame. That is the single most reliable cut you can make.</p>
<p>It is also the most often skipped. People compress a 800-pixel-wide loop and then upload it as a Discord custom emoji, which is <strong>shown at 32×32 pixels</strong> and accepted for upload at up to <strong>128×128</strong>. All of those extra pixels are paid for and then thrown away.</p>
<p>Crop is part of the same lever. If the subject sits in the middle of a large canvas, cutting the empty margin away is free quality: you remove pixels you were never going to see. Resize only after the frame is tight.</p>
<p>A practical rule: <strong>size the file to the size it will be displayed</strong>, or to the platform's upload size, whichever is required. Do not keep a banner-sized canvas "for quality" if the destination is an emoji.</p>
<h3>2. Frames and duration</h3>
<p>Every frame is another paletted image. A 3-second loop at 30 frames per second is 90 pictures; the same loop at 12–15 frames per second is often less than half of that, and many simple animations still read as smooth.</p>
<p>Two related cuts are even cheaper:</p>
<ul>
<li><strong>Trim</strong> the lead-in and the dead end. File size scales roughly with how long the loop runs.</li>
<li><strong>Merge identical or near-identical frames</strong> and keep the delay, so the timing stays the same but the duplicate pictures disappear.</li>
</ul>
<p>Dropping frames is more visible than cropping empty space, so do it after you have already tightened the canvas — and adjust the frame delays so the animation does not suddenly run twice as fast.</p>
<h3>3. The palette</h3>
<p>Because each frame is limited to 256 colours, "full colour" was never on the table. What you <em>can</em> do is spend fewer of those 256 slots.</p>
<p>A graphic with flat fills and hard edges often still looks right at 128, 64 or even 32 colours. A soft, photographic GIF does not: posterisation and dithering show up quickly. Adaptive palettes (chosen from the image itself) beat a generic one. Dithering can hide a short palette in a still picture and then fight LZW in a moving one, because the dither pattern changes from frame to frame and looks like noise.</p>
<p>This is why a "colourful anime still with a simple background" usually compresses more kindly than a live-action clip of the same pixel size. That is a property of the format, not of a particular website.</p>
<h3>4. Lossless tidy-up, then lossy — not the other way around</h3>
<p>Before you throw information away, run a <strong>lossless</strong> pass. Tools such as gifsicle already do this well: they tidy the palettes and store only the pixels that changed between frames. The picture should look identical. The file often does not.</p>
<p>If it is still over the limit, <strong>lossy GIF compression</strong> is the next step. The usual trick — popularised by Kornel's gifsicle <code>--lossy</code> option — is to introduce small colour errors that LZW can then pack more tightly. Used gently, it is hard to see on a small emoji. Used heavily, you get dirty edges and crawling artefacts.</p>
<p>A quality slider that jumps straight to heavy lossy, or that resizes last after already destroying the palette, is why so many compressed GIFs look worse than they need to. The better sequence is: lossless differencing, then a little lossy, then fewer colours, then fewer frames, and only then a smaller canvas if the budget is still missed.</p>
<p>That is also the sequence a target-size compressor should walk, stopping at the first step that fits so you keep as much quality as possible.</p>
<h2>The limit you are missing is often the wrong one</h2>
<p>A file that is "too big for Discord" is almost never too big for <em>Discord</em>. It is too big for one <em>upload type</em>. The caps are different, and they are easy to mix up.</p>
<p>These figures are from TinyGIF's <a href="https://tinygif.app/guides/discord-file-size-limits">Discord file size limits</a> guide, which cites the Discord pages and the date they were last checked (emoji, sticker and avatar rows: 16 October 2026; banners: 28 October 2026; chat uploads: 12 November 2026):</p>
<table>
<thead>
<tr>
<th>What you are uploading</th>
<th>Size cap</th>
<th>Shape and notes</th>
</tr>
</thead>
<tbody><tr>
<td>Custom emoji</td>
<td>Under 256 KB (the developer docs write 256 KiB)</td>
<td>Uploaded at up to 128×128 px; shown at 32×32. GIF, PNG, JPEG or WEBP.</td>
</tr>
<tr>
<td>Sticker</td>
<td>512 KB or less</td>
<td><strong>Exactly</strong> 320×320 px. Discord's sticker FAQ lists APNG for animated stickers; a Discord blog post has also mentioned GIF. The two pages still disagree.</td>
</tr>
<tr>
<td>Profile banner (Nitro)</td>
<td>Under 10 MB</td>
<td>At least 680×240 px (some Discord pages say 600×240), in a 17:6 shape.</td>
</tr>
<tr>
<td>Profile avatar (Nitro for animated)</td>
<td>Under 10 MB</td>
<td>Square, roughly 200×200 px or larger. Server-specific avatars are limited to 8 MB.</td>
</tr>
<tr>
<td>Chat attachment (free account)</td>
<td>20 MB per file, as of August 2026</td>
<td>Nitro Basic raises this to 50 MB, full Nitro to 1 GB. Server Boost can raise it for everyone in that server.</td>
</tr>
</tbody></table>
<p>Two wording details that catch people out:</p>
<ul>
<li><strong>Kilobytes are not agreed on.</strong> Platforms rarely say whether they mean 1,000 or 1,024 bytes, and Discord's developer docs use KiB for emoji. A file that is 255.9 KB in a file manager that counts 1,000-byte kilobytes can still be over 256 KiB. Aim a few percent under the stated number.</li>
<li><strong>Stickers are a shape constraint, not just a size cap.</strong> A 298×291 GIF under 512 KB will still be rejected, because it is not 320×320. Going up to 320×320 can then push the file over 512 KB, which is why people feel stuck. Resize or crop to the exact square first, then spend the other three levers on the byte budget. If the upload form wants an APNG, convert after the file already fits, and check the size again — a format change can move the byte count.</li>
</ul>
<p>Banners have a similar trap. The official cap is under 10 MB, but user reports (not official Discord documentation) say files close to that cap can still fail after Discord's own crop step. People have had more luck shrinking the width, or uploading on mobile, which sometimes skips a desktop crop. Treat those as workarounds, not as published rules.</p>
<h2>A short recipe that usually works</h2>
<ol>
<li><strong>Name the destination.</strong> Emoji, sticker, banner, avatar or chat. Look up that row, not the 20 MB chat cap, unless you are actually attaching a file in a message.</li>
<li><strong>Crop and resize to the required shape</strong> before you lean on heavy compression. 128×128 for an emoji; exactly 320×320 for a sticker; 17:6 and at least 680×240 for a banner.</li>
<li><strong>Trim the loop</strong> so you are not paying for frames nobody needs.</li>
<li><strong>Run a lossless optimisation</strong>, then lossy and a shorter palette only as far as you have to.</li>
<li><strong>If it still misses</strong>, drop frames and, last, shrink the canvas a little more. For an emoji that is displayed at 32×32, a slightly smaller upload is usually a better trade than a muddy 128×128 file.</li>
</ol>
<p>If you want a tool that walks that sequence to a target you type in, the <a href="https://tinygif.app/gif-compressor">GIF compressor</a> runs it in the browser — the file never leaves your device — and stops at the first step that fits. The <a href="https://tinygif.app/discord-gif-compressor">Discord GIF compressor</a> is the same engine with the emoji, sticker, banner, avatar and chat presets already filled in.</p>
<p>You do not need either of those tools to apply the levers. gifsicle, FFmpeg and a crop tool will do the same work if you prefer a command line. The format does not care which program turns the knobs. It only cares that you turn the right ones, in the right order, toward the limit that actually applies.</p>
]]></content:encoded></item></channel></rss>