March 22, 20265 min read

Twitter/X GIF Upload: Size, Duration, and Quality Limits

Everything you need to know about uploading GIFs to Twitter/X — file size limits, duration caps, quality degradation, and how to compress GIFs for the best results.

twitterxgifplatform-limits

Twitter/X GIF limits at a glance

  • Max file size: 15 MB for web; 5 MB on mobile apps
  • Max duration: 30 seconds
  • Max dimensions: 1280 × 1080 px (web); 640 × 480 px recommended for compatibility
  • Max frames: 350 (implied by the 30-second cap at ~12 FPS)

In practice, Twitter/X re-encodes uploaded GIFs to MP4/WebM for playback. The GIF file itself is not stored or served — Twitter converts it server-side. This means:

  1. The re-encoding introduces quality loss regardless of your source GIF quality
  2. You can't "download" the GIF back from Twitter — you'll only get the video version
  3. Uploading a very high-quality GIF won't look better than a well-compressed one

Mobile vs desktop limits

The 5 MB mobile limit is the more important one in practice. Most Twitter/X users are on mobile, and if your GIF exceeds 5 MB it won't upload from the iOS or Android app — even though the web version accepts up to 15 MB. Compress for 5 MB if you want universal compatibility.

Quality recommendations

Since Twitter re-encodes your GIF anyway, there's limited value in uploading the highest possible quality. A 2–4 MB GIF at 640 px wide is typically indistinguishable from a 14 MB version after Twitter's re-encoding pipeline.

Recommended settings for Twitter/X:

  • Width: 640 px
  • Target size: under 4 MB (leaves headroom for mobile)
  • Colors: 128 (usually sufficient; go to 64 for very small GIFs)

GIF vs video on Twitter/X

Twitter/X natively supports MP4 video up to 512 MB. If you have a source video, uploading it as MP4 will always look better than converting to GIF first. Use GIF uploads only when you specifically need the "GIF" behavior (loops automatically without audio) and don't have a video source available.

Common upload errors

"Media failed to process" — usually a file size or frame count issue. Compress below 5 MB and trim to under 30 seconds.

"This GIF can't be uploaded" — sometimes caused by corrupt GIF headers or unusually large color tables. Try re-encoding via GifMash's compressor, which re-writes the GIF from scratch.

Compress GIF for Twitter/X

GifMash pre-configures the compressor for Twitter/X's 15 MB limit and 640 px width.

Try it free