To optimize a GIF in Photoshop, open the animation, choose File > Export > Save for Web (Legacy), set the format to GIF, lower the Colors list to 128 or 64, optionally nudge the Lossy slider, and Save. That single workflow is the most reliable way to shrink an animated GIF with a desktop editor, and it works because GIF is a palette-based format where the per-frame color count is the dominant size lever. A browser-based GIF Optimizer applies the same lever — re-encoding every visible frame with a palette of 256, 128, or 64 colors — but runs the decode, quantize, and encode pass entirely in your tab. The browser path skips Save for Web entirely, removes the Photoshop license requirement, and displays the real before-and-after byte count instead of hiding a possible size increase. Both methods keep frame order and per-frame delays, and both can grow a tightly optimized source when full-frame re-encoding replaces efficient partial-frame patches. The right choice comes down to whether you need granular Photoshop controls or a fast, no-upload workflow that you can run on any machine.

What "Optimizing" a GIF Actually Means
A GIF is not a raw bitmap; it is a stream of palette tables and indexed pixels, sometimes with partial-frame updates that paint only the changed rectangle. Because the color count, frame disposal method, and update region all influence the byte stream, optimization is really a small set of deliberate trade-offs. The most common lever is the palette size per frame: every color in the table costs bytes, and a 64-color frame often indexes more efficiently than a 256-color one. Other levers include lossy compression, frame disposal tuning, dithering strategy, and removing duplicate frames — none of which are universal wins. The point of any optimizer, including Photoshop's Save for Web dialog and the browser-based GIF Optimizer, is to let you change one or more of those levers and see whether the trade is worth it for that specific animation.
How to Optimize a GIF in Photoshop
Follow these steps in Photoshop to re-export an animated GIF with a smaller palette and lossy compression. This is the same workflow Adobe documents for animated GIF export.
- Open the animated GIF with File > Open, or drag the file onto the Photoshop workspace. If the Timeline panel is hidden, open it from Window > Timeline so you can confirm the frame count and that the animation is intact.
- Choose File > Export > Save for Web (Legacy). The legacy dialog remains the most direct GIF export in current Photoshop versions and exposes the palette, lossy, dithering, and looping controls on a single panel.
- In the top-right format dropdown, pick GIF. The preview will refresh and show the current animated preview at the bottom-left.
- Open the Colors dropdown and reduce it from 256 down to 128 or 64. For flat illustrations and UI animations, 128 is usually a safe starting point; for tightly compressed source GIFs you may need 64 to see a meaningful reduction.
- Optional: drag the Lossy slider to a small value, often 5 to 15. A small lossy value lets the encoder merge near-identical colors and usually shrinks the file further without an obvious visual change.
- Confirm the Looping Options dropdown is set to Forever if you want the exported GIF to play continuously. Photoshop matches the source's loop count by default, but a continuous loop is usually safer for web publishing.
- Click Save, choose a destination filename, and wait for Photoshop to encode the new GIF stream.
This is the official Adobe workflow for animated GIFs and matches the Save for Web (Legacy) guidance Adobe publishes for the legacy dialog. The same color, lossy, and dithering controls are not all available in File > Export > Export As, which is why Save for Web (Legacy) is the path most guides recommend.
Why a Browser-Based GIF Optimizer Exists
Photoshop's Save for Web is powerful, but it requires a paid desktop license, a full project round-trip, and the right operating system. For a one-off GIF shrink — especially when the file lives on a work laptop, a tablet, or a shared machine without Photoshop — that overhead is real. A browser-based GIF Optimizer moves the same palette-reduction logic into your current tab. According to the tool's contract, the GIF is decoded with the standard browser canvas APIs, every visible frame is composited into a complete logical canvas, each output frame is quantized to your chosen 256, 128, or 64 color palette, and a new GIF is encoded locally — no upload, no account, no server queue. The page then displays the original byte count and the new byte count, which is the only honest way to evaluate whether the trade worked. This workflow matches the underlying browser APIs documented at CanvasRenderingContext2D.getImageData for pixel access and Blob for the local download. If you already use Photoshop for image edits and want a deeper visual breakdown of these compression ideas, the guide on compressing images in Photoshop or instantly in your browser walks through both paths side by side.
How to Optimize a GIF Locally With GIF Optimizer
For a no-install alternative to the Photoshop workflow, the GIF Optimizer rebuilds the GIF in your browser with explicit palette control and reports the real byte change.
- Choose an animated GIF up to 20 MB from your local disk, with a canvas no larger than 4,096 pixels on either side, no more than three million pixels per frame, and no more than 50 image frames. The browser reads it as a Blob and never sends it to a server.
- Select a palette size of 256, 128, or 64 colors. This is the only compression lever the tool exposes, and it matches Photoshop's Colors dropdown.
- Click Optimize GIF. The page decodes every visible frame, composes any partial-frame patches into a complete logical canvas, quantizes each frame to the chosen palette, and re-encodes a new GIF.
- Compare the original and output sizes shown on the page. The byte change is the honest result; a positive percentage is not relabeled as a saving.
- Download the new GIF and play a full loop to verify the colors, transparency edges, and per-frame delays still match what you expected.
The tool keeps the original on your disk untouched and exports the new GIF as a fresh Blob download. Because the re-encode composites partial-frame patches into full canvases, a source that was already highly optimized with tiny changed rectangles can grow after this step. Treat that growth as information, not a failure.
Picking the Right Palette: 256, 128, or 64
The three palette options are the only compression controls the browser tool exposes, and they line up almost exactly with Photoshop's Colors dropdown. Pick by content type rather than by chasing the smallest byte count.
| Palette size | Best for | Risk |
|---|---|---|
| 256 colors | Photos, gradients, fine text, anti-aliased UI | Largest palette; smallest per-frame reduction |
| 128 colors | Illustrations, screen recordings, UI animations with moderate color variety | Subtle banding in gradients and skin tones |
| 64 colors | Flat drawings, icon loops, sticker animations, deliberate simplification | Visible banding in any photo-like content |
The tool's own guidance is to start at 128, inspect one full loop side by side with the source, then try 64 only if the visual quality still looks acceptable. Always inspect the downloaded result at its actual destination size — banding that is invisible at full screen can become obvious in a chat thumbnail or an avatar crop.
Trade-Offs to Watch After Optimization
Re-encoding a GIF is not free. Three outcomes deserve explicit attention before you replace the original.
Partial frames become full frames. The browser tool composites partial-frame patches into complete canvases before quantization, so every output frame is a full picture. A source that relied on tiny changed rectangles to save space can grow after this step. The trade is intentional and is the only way to guarantee consistent transparency and disposal across frames.
Metadata is dropped. The exported GIF is a new stream. It does not preserve the source's comment blocks, application extensions, byte-level optimization method, or a finite loop count. The result is configured to repeat continuously. If you need original metadata or a specific loop count, keep the source file untouched.
Transparency is one-bit. GIF supports a single binary transparent index per frame. After palette reduction, transparent pixels are encoded within that model. Smooth semi-transparent edges in the source can become sharp on or off edges in the output, especially at 64 colors. Inspect any transparency-heavy animation at the size it will actually be published, not just at full screen.
When to Use Photoshop, GIF Optimizer, or a Resize-First Workflow
Each path wins in a different situation. Use Photoshop's Save for Web (Legacy) when you are already in a Photoshop session, need fine control over dithering, or want to combine the GIF shrink with other frame-level edits. Use GIF Optimizer when the GIF lives outside a Photoshop workflow, you want a one-click palette experiment, or you need to verify the actual byte change before committing to the result. If the source GIF is much larger than its published display size, resize it first so palette quantization has fewer pixels to encode, then re-encode for an additional reduction. For guidance on that resize-first path, the article on resizing a GIF smaller in your browser walks through the pixel-dimension half of the optimization problem.
The honest summary: both Photoshop and a browser-based GIF Optimizer save bytes by changing one explicit variable — the per-frame color count — and both can produce a larger output. The only optimization choice that always helps is keeping the original file until you have verified the new one plays correctly at its real destination size.