
Optimize GIF
Shrink an animated GIF by lowering its color count, dropping frames or resizing it, through the same GIF89a encoder and decoder video-to-gif uses. Reports the size before and after. Runs in Node, the CLI and MCP as well as the browser.
Optimize GIF shrinks an animated file by cutting its palette size, dropping every Nth frame, or resizing it. The same GIF89a reader and writer behind Video to GIF do the work here. The result names the byte count before and after, and dropping every single frame is refused. This works in Node, the CLI, or MCP, no browser required.
Questions
How much smaller will my GIF get?
That depends on the settings and the source. The report names the exact byte count before and after, so you can judge each run rather than expect a fixed percentage.
What does dropEveryNth do?
It removes every Nth frame to shrink the file further, 0 by default, meaning every frame is kept. Setting it high enough to remove every frame is refused.
Does resizing keep the aspect ratio?
Yes. Setting width scales the height to match the source proportions automatically; leaving it blank keeps the original width and height.
What colour count should I use?
Between 2 and 256, 128 by default. A smaller palette shrinks the file further at the cost of more visible banding in gradients.
Does this run outside the browser?
Yes. It uses the same plain byte GIF encoder and decoder as video-to-gif, with no canvas involved, so it runs in Node, on the command line and through MCP as well as the browser.
Compare
| Tool | Runs on the CLI | Live as you type |
|---|---|---|
| Optimize GIF | Yes | No |
| Video thumbnail | No | No |
| Extract video frames | No | No |
| Video to GIF | No | No |
| GIF to video | No | No |