5 min read · Updated April 2026

How to Compress a GIF for Twitter / X (15 MB rules, 2026)

Twitter's GIF rules are weird — too short, too long, or wrong FPS and your GIF turns into a silent muted video. Get the compression settings right with the exact recipe.

Open the GIF compressor

Smart auto-fit · trim · resize · transparency — all free, in your browser

The Twitter rules (as of April 2026)

  • Max file size: 15 MB on web · 5 MB on mobile
  • Max duration: no formal cap, but 5s is the sweet spot
  • Frame rate: anything 24–30 fps works; lower will be padded
  • Dimensions: minimum 32×32, no upper cap

If you target under 5 MB, you're safe on every device and Twitter is less aggressive about re-encoding it. That's our goal.

Use smart-fit "Twitter / X"

On the compressor, click the Twitter / X smart-fit button. It targets ≤ 5 MB by tuning scale, frame stride, and palette automatically. No guessing.

Why short clips win on Twitter

Twitter silently converts most GIFs to MP4 video. The shorter and cleaner your input, the less it has to re-encode and the better the playback looks. A 2-second 480px loop usually plays back identical to source; a 10-second 720px loop comes out blurry and color-shifted.

Use Trim ends and Cut middle on the compressor to keep the loop tight. If you have a long animation, consider posting it as a video (MP4) directly — there's a GIF-to-MP4 converter for that.

The format trap

If your GIF is mostly photographic (gradient backgrounds, faces, skin tones), Twitter's MP4 conversion will crush it. Two options:

  1. Convert it to a transparent GIF first using AI background removal — transparent GIFs survive Twitter's encoder much better.
  2. Skip GIF entirely. Use the GIF-to-video tool to upload as MP4 directly.

The proven recipe

For a typical reaction or meme clip:

  • Duration: 2–4 seconds (≤ 60 frames)
  • Width: 480 px
  • FPS: 24
  • Target size: 4 MB

That's the sweet spot for a Twitter-friendly GIF that doesn't get re-encoded into mud.

FAQ

What's the maximum GIF size on Twitter / X?
15 MB on web. Mobile uploads are capped at 5 MB. If you target 5 MB, the file works on both.
Why does Twitter convert my GIF to a video?
Twitter silently re-encodes most GIFs as MP4 to save bandwidth. You can't prevent it — but starting with a clean, well-compressed GIF makes the resulting MP4 look much better.
How long can a Twitter GIF be?
No hard rule, but anything over 6 seconds gets aggressively re-encoded. Keep it under 5 seconds and the conversion artifacts almost disappear.

Ready to compress your GIF?

The full compressor — smart auto-fit, trim, resize, transparency, AI options.

Open compressor

More compression guides