How to Resize a GIF Without Breaking the Animation
Six ways to resize an animated GIF: browser, Photoshop, gifsicle, ImageMagick, PHP Imagick, and ffmpeg. Measured file sizes, Discord KB limits, and the mistakes that freeze a GIF.
Resizing a GIF fails in one of three ways. The animation freezes on frame one. The edges of moving parts fill with flickering junk. Or the GIF resizes fine but is still 3 MB, and Discord rejects it anyway. Each failure has a specific cause, and the method you pick decides which ones you are exposed to.
Pick a method by what you have
| Method | Best for | Watch out for |
|---|---|---|
| Browser tool | One-off resizes, Discord and Slack limits, phones | Memory on very long GIFs |
| Photoshop | Resizing plus retiming frames by hand | Four dialogs, paid license |
| gifsicle | Batches, smallest possible files | Command line only |
| ImageMagick | Crops, padding, scripts | Forgetting -coalesce |
| PHP Imagick | Resizing uploads on a server | GD silently drops frames |
| ffmpeg | Turning MP4 into a GIF at the right size | Default palette looks muddy |
Why a GIF is harder to resize than a JPG
A JPG is one grid of pixels. An animated GIF is a stack of frames, each with its own delay in hundredths of a second, and most of those frames are not complete pictures. To save space, GIF encoders store only the rectangle that changed since the last frame, plus a disposal method that says what to do with the old frame. The GIF89a specification defines four disposal values, and a resizer has to honor all of them.
If a tool scales those partial rectangles one by one, rounding puts each patch half a pixel off from the frame under it. You see this as thin lines that flicker around anything that moves. The fix, in every method below, is to rebuild each full frame first (ImageMagick calls this coalescing), resize the full frames, and only then let the encoder throw away the unchanged areas again.
The third complication is color. Every GIF frame is limited to 256 colors. Smooth resizing blends neighboring pixels and creates shades that were not in the palette, so the encoder has to pick a new one. Nearest-neighbor resizing never creates new colors. More on why that matters for file size below.
Method 1: Resize a GIF online in the browser
The fastest route for a single file is the online GIF resizer on this site. It decodes the GIF in the tab, so nothing is uploaded, which also means it works the same on a phone.
- Drop the GIF onto the page. It shows the pixel size, frame count, and loop length.
- Pick a preset (Discord emoji, 320x320 sticker, Slack, Twitch, email width) or set a percentage or exact pixels.
- Choose Smooth for video clips, Sharp for pixel art, emoji, and anything with text.
- If you have a limit like 256 KB or 512 KB, tick "Fit under a file size". The tool searches for the largest version that fits.
- Compare the result with the original and download.
What it does not do: per-frame editing, speed changes, or lossy GIF compression. For those, keep reading.
Method 2: Resize a GIF in Photoshop
Photoshop CC opens an animated GIF as a frame animation with one layer per frame. Resizing works like any image, as long as you export through the legacy web exporter, since the newer Export As dialog saves a still.
- Open the GIF. If the Timeline panel is hidden, turn it on under Window > Timeline and confirm the frames are there.
- Go to Image > Image Size. Keep the chain icon linked, enter the new width, and set Resample to Bicubic Sharper (reduction). This resizes every frame.
- Open File > Export > Save for Web (Legacy), or press Ctrl+Alt+Shift+S (Cmd+Option+Shift+S on Mac).
- Choose GIF, 256 colors, and set Looping Options to Forever. The bottom-left corner shows the estimated file size, which updates as you change colors.
- Save.
The Save for Web dialog also has its own Image Size fields, so you can skip step 2 and resize at export. Dropping Colors from 256 to 128 in that dialog is Photoshop's quickest way to resize gif file size without changing dimensions, and on flat graphics the difference is hard to see.
Method 3: gifsicle on the command line
gifsicle is a small tool built only for GIFs, and it handles frames and disposal correctly without extra flags. It is the best choice for batches and for squeezing out the last kilobytes.
# Resize to 480 px wide, height follows
gifsicle --resize-width 480 input.gif -o output.gif
# Fit inside 128x128, optimize hard, and cut to 128 colors
gifsicle --resize-fit 128x128 -O3 --colors 128 input.gif -o emoji.gif
# Lossy compression: often 30-50% smaller, with some grain
gifsicle -O3 --lossy=80 input.gif -o smaller.gif--resize-fit keeps the aspect ratio, so a 16:9 clip becomes 128x72, not a square. For a square emoji, crop first.--lossy needs gifsicle 1.92 or newer. Values from 30 to 80 are reasonable. Push it much higher and moving areas start to look grainy. For pixel art, add --resize-method sample to keep hard edges.
Method 4: ImageMagick
ImageMagick is more flexible than gifsicle for crops and padding, but it will happily produce a broken GIF if you skip one flag. The short version:
# Resize by half, then re-optimize
magick input.gif -coalesce -resize 50% -layers Optimize output.gif
# Square 128x128 emoji, cropped from the centre
magick input.gif -coalesce -resize 128x128^ -gravity center \
-extent 128x128 +repage -layers Optimize emoji.gif-coalesce rebuilds every full frame before resizing. Without it you get the flickering-patch problem described above.-layers Optimize puts the partial-frame savings back. Skip it and the output can be several times larger than the input. On ImageMagick 6, use convert instead of magick.
Method 5: PHP animated GIF resize with Imagick
If you resize uploads on a server, the GD extension is the trap.imagecreatefromgif() reads only the first frame, so every animated GIF a user uploads comes out frozen, with no error. Use Imagick and its coalesceImages() method, the same idea as on the command line:
<?php
$gif = new Imagick('input.gif');
$gif = $gif->coalesceImages();
foreach ($gif as $frame) {
$frame->thumbnailImage(320, 0); // 320 px wide, height by ratio
$frame->setImagePage(0, 0, 0, 0); // reset the frame offset
}
$gif = $gif->deconstructImages(); // store only changed areas again
$gif->writeImages('output.gif', true); // true = one animated fileThe second argument to writeImages matters. Withfalse, Imagick writes one file per frame. Also cap the input size before you start: a 1080p GIF with 400 frames coalesces to over 3 GB of raw pixels and will hit PHP's memory limit.
Method 6: MP4 to GIF at the right size with ffmpeg
Most giant GIFs start as screen recordings or phone video converted at full resolution. Set the size during conversion instead of resizing afterwards, and generate a custom palette with ffmpeg's palettegen filter, or the default 256-color palette turns skin and skies blotchy:
ffmpeg -i clip.mp4 -vf "fps=12,scale=480:-1:flags=lanczos,split[a][b];[a]palettegen[p];[b][p]paletteuse" -loop 0 clip.giffps=12 is plenty for reaction clips and halves the frames of a 24 fps source. scale=480:-1 sets the width and keeps the ratio. Already converted the video and the GIF is too big? Run it through Method 1 or 3 rather than converting again from a lower quality copy.
Hitting a file size limit: 256 KB, 512 KB, and up
Discord emoji must be under 256 KB, Discord stickers 512 KB at exactly 320x320, and Slack recommends emoji under 128 KB. We measured how much each lever saves on a 512x512, 14-frame sample GIF with smooth gradients that started at 116 KB (you can see the files on the GIF resizer page):
- 50% size, Smooth: 43.9 KB (38% of the original)
- 50% size, Sharp: 42.5 KB. Only 3% smaller here, but 25% smaller on a flat-color countdown GIF, because Sharp creates no new colors
- 50% size, every 2nd frame: 23.1 KB
- 25% size (128x128): 18.5 KB
- 200% size, Sharp: 294 KB, 2.5 times the original
So the order is: shrink pixels first (biggest effect), drop frames second (nearly as strong, and keeps exact dimensions), reduce colors or go lossy last. When a platform demands a fixed size like 128x128, frames are your main lever. Dropping every 2nd frame of a 25 fps clip leaves 12.5 fps, which still reads as smooth motion for most reaction GIFs. Below about 8 frames per loop it starts to look like a slideshow.
One detail that catches people: Discord counts 256 KB as 262,144 bytes, while many upload portals count 1 KB as 1,000 bytes. Aim for 250 KB and you pass either way.
How to resize a GIF without losing quality
Downscaling does not lose quality in any way you will notice, as long as large reductions happen in steps. Upscaling always does: the tool has to invent pixels. Some rules that hold across every method:
- Resize from the original. Every save re-picks the 256-color palette. Resizing a GIF that was already resized stacks that loss.
- Use nearest neighbor for pixel art, and only whole-number factors like 2x or 3x. At 150%, some pixels come out one wide and some two, and the sprite looks lumpy.
- Use smooth resizing for video clips. Nearest neighbor on a downscaled clip makes fine detail like hair and grass shimmer from frame to frame.
- Keep the source video if there is one. A fresh ffmpeg conversion at the target size beats any resize of an existing GIF.
Mistakes that break a resized GIF
- Resizing with CSS only.
width: 300pxshrinks how the GIF looks, but visitors still download the full file. A 4 MB GIF shown at 300 px is still 4 MB. - Using a photo resizer. Most tools for JPG and PNG, including the still image resizer on this site, read the first frame only. Fine for a thumbnail, wrong for an animation.
- Skipping coalesce in ImageMagick, or resizing without re-optimizing, which can make a smaller GIF a larger file.
- Stretching to a square. Emoji slots are square, most clips are not. Crop to fill or pad with transparency rather than distorting faces.
- Upscaling small GIFs for a sharper look. It cannot add detail and roughly multiplies the file size by the square of the factor.
Once the size is right, the next job is often layout. To put the resized GIF next to another one, combine animated GIFs side by side while both keep playing. To mirror it first, use the GIF flipper.
Questions about resizing GIFs
Can you resize GIFs?
Yes, and an animated GIF keeps its animation as long as the tool resizes every frame. Tools built for photos often read only the first frame and give you a still. A GIF-aware resizer, Photoshop, gifsicle, or ImageMagick with -coalesce all keep the frames and their delays.
How do I resize a GIF to a smaller KB size?
Reduce pixels first, since file size drops roughly with pixel count: halving the width took our 116 KB sample GIF to 43.9 KB. If you need the exact dimensions, skip every 2nd frame next (23.1 KB at half size). Reducing colors or lossy compression with gifsicle comes last. The online GIF resizer on this site has a "Fit under a file size" option that does this search for you.
How do I resize a GIF in Photoshop CC?
Open the GIF, check that Window > Timeline shows the frames, then use Image > Image Size with Bicubic Sharper for reduction. Export with File > Export > Save for Web (Legacy), choose GIF, set Looping Options to Forever, and save. Image Size resizes all frames at once.
How do I resize a GIF for Discord?
Emoji need to be under 256 KB and look best at 128x128. Stickers are 320x320 and under 512 KB. Crop to a square, resize, and if the file is still too big, drop every other frame instead of shrinking further. The Discord emoji preset in the GIF resizer does all three steps.
Why does my GIF stop moving after I resize it?
The tool you used only read the first frame. This happens with PHP GD, many photo editors, and any web tool that draws the GIF onto a canvas once. Use a tool that decodes each frame, or with ImageMagick add -coalesce before -resize.
Resize an animated GIF now
Presets for Discord and Slack, a KB target, and sharp mode for pixel art. No upload.