<?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: AsyncMonk</title>
    <description>The latest articles on DEV Community by AsyncMonk (@shu_jing_915fa287b22539ad).</description>
    <link>https://dev.to/shu_jing_915fa287b22539ad</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%2F4087883%2F59a5c86a-9fa5-4349-971d-f26ba405bf1e.png</url>
      <title>DEV Community: AsyncMonk</title>
      <link>https://dev.to/shu_jing_915fa287b22539ad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shu_jing_915fa287b22539ad"/>
    <language>en</language>
    <item>
      <title>I waited five seconds for my own docs site on the subway, so I put its GIFs on a diet</title>
      <dc:creator>AsyncMonk</dc:creator>
      <pubDate>Tue, 01 Sep 2026 02:39:46 +0000</pubDate>
      <link>https://dev.to/shu_jing_915fa287b22539ad/i-waited-five-seconds-for-my-own-docs-site-on-the-subway-so-i-put-its-gifs-on-a-diet-561d</link>
      <guid>https://dev.to/shu_jing_915fa287b22539ad/i-waited-five-seconds-for-my-own-docs-site-on-the-subway-so-i-put-its-gifs-on-a-diet-561d</guid>
      <description>&lt;p&gt;My docs site has five demo animations above the fold. 269 KB total. Not much — until I opened my own site on the subway and sat there watching a blank rectangle.&lt;/p&gt;

&lt;p&gt;I went home and compressed all five. Here's every number, including the cost.&lt;/p&gt;




&lt;h3&gt;
  
  
  Before
&lt;/h3&gt;

&lt;p&gt;All five are screen recordings: the interface mostly holds still, a progress bar and a cursor move. Dimensions from 560×315 to 720×405, 24 to 40 frames.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Size · frames&lt;/th&gt;
&lt;th&gt;Original&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;install&lt;/td&gt;
&lt;td&gt;560×315 · 24&lt;/td&gt;
&lt;td&gt;56.0 KB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;config&lt;/td&gt;
&lt;td&gt;640×360 · 30&lt;/td&gt;
&lt;td&gt;62.7 KB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;deploy&lt;/td&gt;
&lt;td&gt;720×405 · 40&lt;/td&gt;
&lt;td&gt;46.6 KB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;debug&lt;/td&gt;
&lt;td&gt;600×338 · 28&lt;/td&gt;
&lt;td&gt;33.0 KB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;metrics&lt;/td&gt;
&lt;td&gt;680×383 · 34&lt;/td&gt;
&lt;td&gt;70.7 KB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;269.0 KB&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  What I changed
&lt;/h3&gt;

&lt;p&gt;One line: &lt;strong&gt;palette reduction and frame differencing only. Dimensions and frame rate untouched.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That was a rule I set for myself before starting. Shrinking dimensions blurs the small text in the UI; dropping frames makes the cursor stutter. Both of those change the content, and what I wanted was the same footage taking less room.&lt;/p&gt;

&lt;p&gt;I used ImgIng's animation workshop (imging.ai). The practical reason: these recordings show an internal console, and I'd rather not upload them anywhere. Frame splitting and re-encoding run in the browser — I kept the Network tab open through all five files and &lt;strong&gt;no POST request was made&lt;/strong&gt;. Don't take my word for it; the check takes a minute.&lt;/p&gt;

&lt;h3&gt;
  
  
  After
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Before&lt;/th&gt;
&lt;th&gt;After&lt;/th&gt;
&lt;th&gt;Change&lt;/th&gt;
&lt;th&gt;Auto-selected&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;install&lt;/td&gt;
&lt;td&gt;56.0 KB&lt;/td&gt;
&lt;td&gt;15.8 KB&lt;/td&gt;
&lt;td&gt;−71.8%&lt;/td&gt;
&lt;td&gt;keep GIF · 64 colours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;config&lt;/td&gt;
&lt;td&gt;62.7 KB&lt;/td&gt;
&lt;td&gt;17.8 KB&lt;/td&gt;
&lt;td&gt;−71.6%&lt;/td&gt;
&lt;td&gt;keep GIF · 64 colours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;deploy&lt;/td&gt;
&lt;td&gt;46.6 KB&lt;/td&gt;
&lt;td&gt;15.5 KB&lt;/td&gt;
&lt;td&gt;−66.7%&lt;/td&gt;
&lt;td&gt;keep GIF · 64 colours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;debug&lt;/td&gt;
&lt;td&gt;33.0 KB&lt;/td&gt;
&lt;td&gt;11.6 KB&lt;/td&gt;
&lt;td&gt;−64.8%&lt;/td&gt;
&lt;td&gt;keep GIF · 64 colours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;metrics&lt;/td&gt;
&lt;td&gt;70.7 KB&lt;/td&gt;
&lt;td&gt;21.3 KB&lt;/td&gt;
&lt;td&gt;−69.9%&lt;/td&gt;
&lt;td&gt;keep GIF · 64 colours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;269.0 KB&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;82.0 KB&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;−69.5%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;All five landed on 64 colours. I didn't set that — the tool picks it from the content. Flat UI palettes don't need more, and at this footage there's nothing visible to lose.&lt;/p&gt;

&lt;p&gt;The interesting row is &lt;strong&gt;deploy&lt;/strong&gt;: it's the largest and longest of the five and &lt;em&gt;not&lt;/em&gt; the biggest file. Its interface holds still more than any of the others, so differencing wins more. &lt;strong&gt;What sets your ceiling is the proportion of pixels standing still, not the resolution.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What it cost
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Cost 1: the palette went from 256 to 64.&lt;/strong&gt; Invisible on flat interfaces. If your demos have gradient backgrounds, photos, or semi-transparent overlays, 64 colours will band. Mine are pure UI, so nothing to see.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost 2: one more step forever.&lt;/strong&gt; Every future demo recording now has to be compressed before it ships. I added it to the release checklist, because otherwise I would absolutely forget.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it did not cost:&lt;/strong&gt; dimensions, frame rate, playback timing. Original frame durations and loop settings came through intact. I checked that on purpose — if the pacing of a screen recording changes, the demo is lying about how fast the product is.&lt;/p&gt;

&lt;h3&gt;
  
  
  Two categories I didn't touch
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The two video-derived animations in the README.&lt;/strong&gt; Live action, gradients, every pixel changing. I tried one; the size barely moved. That material shouldn't be a GIF at all — I swapped those for a video element instead, which is a different job.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spinners from the component library.&lt;/strong&gt; Third-party, already optimised. I ran one 2 KB spinner through: it came out at 1.5 KB. &lt;strong&gt;Five hundred bytes isn't worth the changelog line.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Was it worth it
&lt;/h3&gt;

&lt;p&gt;187 KB saved. Honestly, on a docs site with three-digit daily traffic, that's a number too small to brag about.&lt;/p&gt;

&lt;p&gt;But those seconds on the subway were real. &lt;strong&gt;When you build alone, a lot of decisions happen this way — not calculated, just personally annoyed by something you made yourself.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The rational version: those animations are all above the fold, so they compete with first paint on a weak connection, and the work was a one-time twenty minutes. If yours sit on secondary pages or already lazy-load, push this down your list. &lt;strong&gt;Don't restructure anything for 187 KB.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Limits
&lt;/h3&gt;

&lt;p&gt;These numbers come from my own footage, all flat-palette UI recordings. &lt;strong&gt;A different kind of animation gives completely different results&lt;/strong&gt; — the same operation saved 7.9% on a gradient banner and nothing at all on full-frame noise. What you can take from this is the method and a reference point, not a ratio to apply.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>images</category>
    </item>
  </channel>
</rss>
