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.
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:
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.
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:
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.
"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.