What X does with your GIF the moment you post it
Start with the platform's actual behavior, because it explains every recommendation that follows. A GIF attached to a post autoplays silently in the timeline and loops. But X doesn't store or serve your file: on upload it converts the GIF into a compressed looping MP4 and serves that instead. The GIF badge in the corner is a costume.
That changes the optimization target. You're not tuning a file for how it looks on your desktop; you're tuning the input to a second encoder you don't control. Over-crunch the GIF (harsh dithering, starved palette) and X compresses your artifacts on top of themselves, and the result smears. The winning move is slightly counterintuitive: build a clean, generous GIF, the high-fidelity way, and let X's encoder do the dieting.
The limits, with appropriate skepticism
X's media rules drift over time, so treat these as the commonly cited targets rather than law:
- Weight: up to about 15 MB from the web uploader, with the mobile apps historically stricter at around 5 MB. Staying under 5 MB clears every door.
- Duration: roughly 15 seconds tops. The feed rewards far less.
- Pixels: dimensions are typically accepted between 8 and 1280. X displays nothing wider than 1280, so extra resolution is spent bytes.
- Motion: since X re-times playback anyway, 12 to 15 fps of source is plenty.
- Shape: aspect ratios roughly between 1:3 and 3:1 go through; ordinary ratios never test that boundary.
If you remember one number, make it 1280 wide: maximum detail for the re-encoder, zero waste. And when a post gets bounced anyway, check weight and duration first; those two account for nearly every rejection.
Pick the shape for a phone column
The timeline on a phone is a tall, narrow strip, and that's where most of your audience will meet the GIF. Landscape footage shrinks into a ribbon with empty space around it, which is fine for a screen capture and lousy for a face. Match the ratio to the subject before you think about anything else:
- 16:9 when the width is the content: gameplay, desktop recordings, side-by-sides.
- 1:1 for reactions and single subjects; it takes more of the column than widescreen and cuts the clutter at the edges.
- 4:5 for the tallest footprint X gives an image before treating it like portrait video.
- 9:16 only when the source is truly vertical, since X letterboxes tall media.
The converter's crop locks to those exact ratios (plus 4:3 for older footage), so the frame you choose is the frame that posts, not an approximation of it.
Loop craft inside the 15-second window
A GIF repeats forever, so the seam is the craft. When the last frame hands off naturally to the first, the loop reads as continuous motion; when it doesn't, every repetition announces the cut. Getting the seam right is a trimming problem, and it's why frame-level control exists here: place your start and end on the timeline, then tap the cuts inward by single frames until the two ends agree.
Keep loops between about two and six seconds. That's long enough to land a moment and short enough to survive a third viewing. Length is also your cheapest compression: shaving two seconds off a six-second loop drops more weight than any palette trick, a point the small-GIF guide makes at length.
Convert it where the footage already is
Twitter GIFs tend to come from your own recordings: the bug capture, the stream highlight, the clip off your camera roll. None of that footage needs to visit a third-party server to become a four-second loop. What the GIF converts it in your browser: drag the file in (MP4, MOV, WebM, or anything decodable), trim, crop, check the projected size, download. The tool is free, ad-supported, adds no watermark, and asks for no account.
The same loop usually has a second life elsewhere. Sizes and ratios shift per platform, and the Instagram guide covers the strangest of them.