Images

Compress a GIF on Mac (and Get Under Upload Limits)

By the Smol team6 min read

To shrink a GIF on a Mac, reduce its width, drop its frame rate and rebuild its palette. One ffmpeg command does all three. On my test GIF that cut 959,307 bytes to 305,509. If the site accepts video, an MP4 is smaller still.

Preview and QuickTime cannot do this. Below is the command, a measured comparison, and an honest note: Smol does not shrink animated GIFs.

Why are GIF files so big?

A GIF stores each frame as an indexed image of at most 256 colors, with only simple compression between frames. It has no video codec. A four-second clip at 15 frames per second is 60 separate pictures. File size scales with width times height times frame count, so those three numbers are your levers.

How do I compress a GIF on Mac with ffmpeg?

Install ffmpeg once with Homebrew (brew install ffmpeg), then run:

ffmpeg -i input.gif -vf "fps=10,scale=320:-1:flags=lanczos,split[a][b];[a]palettegen[p];[b][p]paletteuse" output.gif

fps=10 keeps ten frames a second. scale=320:-1 sets the width to 320 pixels and keeps the proportions. The palettegen and paletteuse pair builds a custom 256-color palette for this clip, which looks better than the default one. Change 320 and 10 until the file is small enough.

Expect to lose some smoothness and sharpness. A GIF that is a screen recording of text will tolerate 10 fps. A fast action clip will look choppy.

How much smaller does each method make a GIF?

My test file was a synthetic 640 x 360 GIF, 60 frames at 15 fps, 959,307 bytes. A synthetic pattern is not a real recording, so treat the percentages as indicative.

MethodBytesResult
Original GIF959,307640 x 360, 60 frames
ffmpeg: 10 fps, 320 wide, new palette305,509About 68% smaller, still a GIF
ffmpeg: H.264 MP4, same size and frames284,116About 70% smaller, not a GIF
Smol compress, default settings927,310About 3% smaller, still 640 x 360, 60 frames
Smol compress, width 320, quality 50927,310Identical to the default run

The MP4 was the smallest at the original size and frame rate, because video codecs compress between frames and GIF does not. Many sites that say they accept GIFs actually convert them to video. If the destination takes MP4 or WebM, send that instead. For the reverse, see converting a GIF to MP4 on Mac.

How do I get a GIF under a size limit for Discord, Slack or email?

Limits change, so check the current number in the service’s own help page before you aim for it. The method is the same whatever the limit is:

  1. Halve the width first. Halving width and height cuts pixels to a quarter.
  2. Drop to 10 fps, then 8 if it is still too large.
  3. Shorten the clip. Trim the first and last second.
  4. Try a video format if the service plays MP4 inline.

Our Discord video guide covers the video route, and compressing a screen recording is the better starting point if your GIF began as one.

What should I cut first: size, frame rate or length?

Cut length first if you can, because it costs no quality at all. Every second you remove takes its frames with it. Then crop away empty margins, since pixels you do not show are pixels you do not store. Reduce width next, and frame rate last, because a low frame rate is the change viewers notice most.

ffmpeg -ss 1 -t 3 -i input.gif -vf "crop=480:270:80:45,fps=12,split[a][b];[a]palettegen[p];[b][p]paletteuse" trimmed.gif

That keeps three seconds starting at one second in, crops a 480 x 270 window offset 80 and 45 pixels from the top left, and runs at 12 fps. I did not benchmark this exact line, so measure it on your own clip. If the GIF is a UI demo, the crop is often the biggest win, since the toolbar and desktop never change.

Should I use an online GIF compressor?

They work, but you upload the file to someone’s server. For a meme, that is fine. For a screen recording of a client dashboard or private chat, it is not. A local ffmpeg run keeps the file on your Mac and has no daily limit.

When is Smol the wrong tool for this?

For animated GIFs, Smol is the wrong tool. I ran Smol 1.0.35 on the test GIF with GIF as the output format. It wrote a file 3% smaller with the same 640 x 360 size and 60 frames. A second run with a 320 pixel width and quality 50 produced the same byte count, so the resize and quality settings did nothing to the animation. Use ffmpeg, or a GIF tool such as gifsicle, for this job.

Smol is built for still images, PDFs, video and audio. If your GIF started as a screen recording, compress the original video instead. It outputs MP4, MOV, WebM and MKV, with the resolution and audio options in the app. See the best video compressor for Mac, or Smol at $29 once.

How we checked this

Generated a 640 x 360, 15 fps, 4 s GIF with ffmpeg, then compared an ffmpeg GIF rebuild, an MP4 and two Smol 1.0.35 runs on macOS 27.0.1 with ffprobe. Facts last checked . We make Smol, so treat our claims about it with the same care as any vendor’s, and see our editorial policy.

Compressing GIFs: common questions

What is the easiest way to reduce GIF file size on a Mac?

Use ffmpeg with a lower frame rate, a smaller width and a generated palette. On my 640 x 360 test GIF, 10 fps at 320 pixels wide cut it from 959,307 to 305,509 bytes. Preview and QuickTime have no GIF compression option.

Is an MP4 smaller than a GIF?

Almost always. My test clip was 284,116 bytes as H.264 MP4 against 959,307 as GIF at the same size and frame count. Video codecs store changes between frames, while GIF stores every frame separately. Use MP4 where the site plays it.

Why is my GIF too large for Discord?

Discord caps upload size, and a GIF of even a few seconds can pass the cap because of its frame-by-frame storage. Cut the width, reduce the frame rate and trim the clip. Check Discord's current limit in its help center since it has changed over time.

Does compressing a GIF make it blurry?

It can. Reducing the 256-color palette causes banding, and shrinking the width reduces detail. A generated palette limits the damage, and a lower frame rate affects smoothness, not sharpness. Simple graphics and screen recordings survive better than video footage.

Can Smol compress an animated GIF?

Not in my test. Smol 1.0.35 kept the GIF animated but shrank it by only about 3%, and ignored the width and quality settings I set. It works on still images, so use ffmpeg or gifsicle for animated GIFs.

Keep reading