<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: suttoncharles</title>
    <description>The latest articles on DEV Community by suttoncharles (@suttoncharles).</description>
    <link>https://dev.to/suttoncharles</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4251378%2F0a112fb2-ba8a-4225-951f-563746009948.jpg</url>
      <title>DEV Community: suttoncharles</title>
      <link>https://dev.to/suttoncharles</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/suttoncharles"/>
    <language>en</language>
    <item>
      <title>GIF compression, measured: dimensions vs. presets</title>
      <dc:creator>suttoncharles</dc:creator>
      <pubDate>Wed, 18 Nov 2026 08:55:01 +0000</pubDate>
      <link>https://dev.to/suttoncharles/gif-compression-measured-dimensions-vs-presets-5f2d</link>
      <guid>https://dev.to/suttoncharles/gif-compression-measured-dimensions-vs-presets-5f2d</guid>
      <description>&lt;p&gt;GIFs keep showing up where they shouldn't: README demos, changelogs, chat attachments, landing page hero images. They're usually the heaviest single asset on the page, and they're the one format where "just export it again at 80% quality" doesn't apply — GIF has no quality slider, only a 256-colour palette and whatever lossy tricks you're willing to run.&lt;/p&gt;

&lt;p&gt;So I measured the two levers you actually have: &lt;strong&gt;dimensions&lt;/strong&gt; and &lt;strong&gt;compression preset&lt;/strong&gt;. Same source image, one variable at a time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Source: one 1200×676 screenshot-style image, exported as a GIF (135.0 KB)&lt;/li&gt;
&lt;li&gt;Two downscaled copies: 600×338 (47.5 KB) and 300×169 (18.1 KB)&lt;/li&gt;
&lt;li&gt;Compressor: Gifsicle compiled to WebAssembly, running client-side (no upload)&lt;/li&gt;
&lt;li&gt;Every file compressed three times, once per preset: Best Quality / Balanced / Smallest File&lt;/li&gt;
&lt;li&gt;Sizes as reported after compression, in KB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A caveat up front: these test files are &lt;strong&gt;single-frame&lt;/strong&gt; GIFs, so this post measures palette/quantisation and scaling behaviour, not frame-count reduction. If your GIF is an animation, frame stride is a fourth lever — but that's a different test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lever 1: dimensions win, and it isn't close
&lt;/h2&gt;

&lt;p&gt;Balanced preset, same image at three widths:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Width&lt;/th&gt;
&lt;th&gt;File size&lt;/th&gt;
&lt;th&gt;Change vs. previous&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1200×676&lt;/td&gt;
&lt;td&gt;135.0 KB&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;600×338&lt;/td&gt;
&lt;td&gt;47.5 KB&lt;/td&gt;
&lt;td&gt;−65%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;300×169&lt;/td&gt;
&lt;td&gt;18.1 KB&lt;/td&gt;
&lt;td&gt;−62%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Halving the width cut the file by roughly two-thirds, twice in a row. That's the whole argument for checking whether the GIF really needs to be 1200px wide before you touch any compression setting: at 600px it's already a third of the weight, and at thumbnail size it's 13% of the original.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lever 2: the preset is a second lever, not the first
&lt;/h2&gt;

&lt;p&gt;Same three files, three presets, totals across all of them (200.6 KB original):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Preset&lt;/th&gt;
&lt;th&gt;Total output&lt;/th&gt;
&lt;th&gt;Saved&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Best Quality&lt;/td&gt;
&lt;td&gt;122.5 KB&lt;/td&gt;
&lt;td&gt;39%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Balanced&lt;/td&gt;
&lt;td&gt;94.1 KB&lt;/td&gt;
&lt;td&gt;53%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Smallest File&lt;/td&gt;
&lt;td&gt;55.7 KB&lt;/td&gt;
&lt;td&gt;72%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Per file, on the 1200-wide original:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Preset&lt;/th&gt;
&lt;th&gt;1200×676&lt;/th&gt;
&lt;th&gt;600×338&lt;/th&gt;
&lt;th&gt;300×169&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Original&lt;/td&gt;
&lt;td&gt;135.0 KB&lt;/td&gt;
&lt;td&gt;47.5 KB&lt;/td&gt;
&lt;td&gt;18.1 KB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best Quality&lt;/td&gt;
&lt;td&gt;81.2 KB (−40%)&lt;/td&gt;
&lt;td&gt;29.6 KB (−38%)&lt;/td&gt;
&lt;td&gt;11.7 KB (−35%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Balanced&lt;/td&gt;
&lt;td&gt;61.1 KB (−55%)&lt;/td&gt;
&lt;td&gt;23.4 KB (−51%)&lt;/td&gt;
&lt;td&gt;9.6 KB (−47%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Smallest File&lt;/td&gt;
&lt;td&gt;35.6 KB (−74%)&lt;/td&gt;
&lt;td&gt;14.4 KB (−70%)&lt;/td&gt;
&lt;td&gt;5.6 KB (−69%)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two things worth noticing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The savings are remarkably stable across sizes.&lt;/strong&gt; A preset that saves 40% on the big file saves 35% on the small one. The preset isn't fighting the dimensions; the effects stack.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The gap between presets is bigger than the gap between "compressed" and "uncompressed."&lt;/strong&gt; Balanced to Smallest File is another −41% on top of what Balanced already removed. If your budget is tight and the GIF is decorative, that's the cheapest win left.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What the presets actually cost you visually
&lt;/h2&gt;

&lt;p&gt;Nothing here is free:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Quality&lt;/strong&gt; — dithering and palette are kept close to the original. Use it for screenshots with text, UI captures, anything where a gradient banding artefact would be obvious.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Balanced&lt;/strong&gt; — the sane default for social and chat GIFs. On photographic content I could not pick it out of a side-by-side at 100%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smallest File&lt;/strong&gt; — aggressive palette reduction. Fine for thumbnails and previews; on flat UI colours it starts to look grainy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rule of thumb from the numbers: &lt;strong&gt;resize first, then choose the weakest preset that still looks right.&lt;/strong&gt; Resizing is where the orders of magnitude are; the preset is the trim.&lt;/p&gt;

&lt;h2&gt;
  
  
  When you should not use a GIF at all
&lt;/h2&gt;

&lt;p&gt;Honest version: if the asset is a looping animation with photographic colour, an MP4 or WebM will beat any GIF optimiser — usually by a factor, not a percentage. GIF's 256-colour limit is not a compression setting you can tune your way out of. Reach for GIF when you need inline playback everywhere, transparency tricks, or a file that renders identically in an &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag with no JS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this runs in the browser
&lt;/h2&gt;

&lt;p&gt;Gifsicle has been the reference tool for years. What changed is that it can now run as WebAssembly, which means the compression happens in the tab: no upload, no server-side size limit, no queue, and no third party holding a copy of a GIF that might contain something private (a support screenshot, an unreleased UI, a customer's data).&lt;/p&gt;

&lt;p&gt;That's the setup I run tests on: &lt;a href="https://gifcompressor.cc" rel="noopener noreferrer"&gt;GifCompressor&lt;/a&gt; — 20 files per batch, 100 MB per file, free, no account. Disclosure: I maintain it. The measurements above come from it, but the levers apply to any Gifsicle-based tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Does the GIF need to be that wide? Halve it and look again — that's −60% before you've done anything clever.&lt;/li&gt;
&lt;li&gt;Then pick the weakest preset that survives a 100% zoom check.&lt;/li&gt;
&lt;li&gt;If it still isn't small enough, ask whether it needs to be a GIF.&lt;/li&gt;
&lt;li&gt;Keep it local if the content is private.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>webdev</category>
      <category>performance</category>
      <category>images</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
