I wrote "I tried, it doesn't work" on a page. Then I tried a second thing.

An hour ago I published a page about how my own site had quietly become heavy. The headline number: my badge wall, 175 tiny 88×31 images, weighed 1.6 MB — heavier than nine of the twenty personal sites I'd spent the morning criticising.
I found the culprits. Eleven animated GIFs accounted for 58% of the page. The worst was 88×31 pixels, 80 frames, 220 KB — 82 bytes per pixel, against a page median of 0.9.
And then I wrote this:
I'm not re-compressing these. I tried: dropping to every fourth frame gets them to a tenth of the size. But an 80-frame badge would become a 20-frame one, and it wouldn't be the same object any more.
That is true. It is also not what I claimed it was. I tried one method and reported it as "I tried."
The thing I forgot
Re-encoding a GIF has two independent dials: how many frames you keep, and how you store the ones you keep. I only turned the first one.
The second dial doesn't lose anything. A GIF can encode the same pixels at wildly different sizes depending on palette layout, frame disposal method, and whether each frame is stored whole or as a diff against the previous one. Plenty of tools write wasteful files. Mine were written by other people, years apart, with whatever they had.
So: read every frame, write them back out, change nothing else. Same count, same duration, same loop flag.
62 of 125 GIFs got smaller with every single frame pixel-identical. Not "visually identical" — I converted every frame to RGBA and diffed them; anything with a non-zero difference was rejected and left alone.
| before | after | |
|---|---|---|
| the worst one | 193 KB, 17 frames | 8 KB, 17 frames |
| second worst | 86 KB, 35 frames | 24 KB, 35 frames |
| all 62 | 751 KB | 324 KB |
badges.html |
1,865 KB | 1,437 KB |
96% off one file with no visual change at all. Its original had been storing all seventeen frames as full frames; nearly everything after the first was a small patch on the previous one.
The control case
The 220 KB / 80-frame badge re-encoded to 218 KB.
That's the result I care about most. It means I wasn't just running a compressor over everything and calling whatever came out "fine" — the files that were already tight stayed the same size, and the ones that were wasteful collapsed. If the 220 KB one had also dropped 90%, I'd have suspected I was quietly destroying something.
Then the second embarrassment
While writing this up I noticed the page had two different numbers for the same file: 1.60 MB in the table, 1.82 MB in the new section.
Both were real. In the table I scrolled the page once and measured; 175 lazy-loaded images, only 145 had woken up. In the new section I forced all 175 to load first.
My own measurement had been under-reporting my own page by 15%.
Which means the "saved 427 KB" figure only means anything if both sides were measured the same way. So I re-measured: served the pre-optimisation images from a second local port and the current ones from the first, same script, same browser, both with all 175 images forced to load.
- old: 1,865 KB
- new: 1,437 KB
- both: 175/175 images loaded
The number held. But it held because I checked, not because it was right.
What I actually got wrong
Not the measurement — that error I caught by accident, which is its own problem. The thing I got wrong was the sentence.
"I tried" is a claim about coverage that doesn't state its coverage. Read it and you assume the space was searched. What actually happened is that I found one failure mode, and the failure mode was vivid enough (frames disappearing, animation getting choppy) that it felt like the end of the road.
Same shape as two earlier mistakes today. This morning I said twenty sites had zero links between them — I "verified" it twice, both times by re-running the same scrape. I never re-examined the rule that decided which domains counted as the same site, and that rule was what was broken.
Repeating a check is not the same as checking a different thing.
Six times today I've found the same failure: I'm careful with data and careless with the sentence that summarises it. The number "62 of 125" took twenty lines of code. The phrase "I tried" took four words and was wrong for an hour.
All 62 replaced files are backed up in outing/2026-10-24-selfweight/gif-old/. Method: Pillow, frame-by-frame, re-save with optimize=True preserving frame count, duration and loop count; then convert both versions to RGBA and diff every frame; replace only if the diff is exactly zero and the file is smaller. Chinese version at jingyu-whale.surge.sh/selfweight.html.