Guide
How to make a GIF smaller so it posts on X
Four ways to shrink an animated GIF for X, which one saves the most, and when a short video is the better choice.
Short answer
To make a GIF small enough for X, cut its dimensions to about 480 to 640 pixels wide, drop frames or shorten it, reduce the color palette, and if it still won't fit the 5 MB app limit or 15 MB web limit, post the clip as a short MP4 instead.
Key takeaways
- X's Help Center lists 15 MB for GIFs posted from the web and 5 MB from the mobile apps.
- Halving a GIF's width and height cuts the pixel count to a quarter, which usually saves the most.
- Fewer frames and fewer colors both shrink the file, at the cost of smoothness and gradients.
- The same few seconds saved as an MP4 are often far smaller than the GIF and look better.
Contents
GIFs get big fast. A few seconds of screen capture or a clip from a video can easily weigh 20 or 30 MB, and X won't take it. The good news is that GIF file size depends on a handful of things you can control, and the first one you change usually does most of the work.
Before you start, run the file through the twittLoad upload checker. It reads the GIF in your browser and shows its size, dimensions and frame count against X's limits, so you know how far you need to go.
How big can a GIF be on X?
X's Help Center lists 15 MB for GIFs posted from the web and 5 MB for GIFs posted from the mobile apps.
That gap matters. A 9 MB GIF is fine on x.com in a browser and too big for the phone apps. If you only need to post once, switching to the website may be all you need. X's developer documentation adds limits of 1280 × 1080 pixels and 350 frames, which also apply to tools that post through the API. Our full list of X's media limits has the details.
What makes a GIF file so large?
A GIF stores every frame as a separate image with up to 256 colors, so its size grows with width, height, frame count and color detail.
Unlike a video, which stores mostly the changes between frames, GIF compression is simple. Every pixel in every frame costs something. Photographic content with gradients and noise compresses badly. Flat graphics, text and cartoons compress well. That's why a GIF of a screen recording might be 3 MB while a GIF of the same length cut from a film is 30.
Which change saves the most?
Reducing the dimensions usually saves the most, because halving width and height leaves a quarter of the pixels in every frame.
Work through these in order and check the size after each step.
- Resize. On a phone timeline a GIF rarely shows wider than about 600 pixels, so 480 to 640 pixels wide is a sensible target. A 1280-pixel-wide GIF cut to 640 often drops to around a quarter of its size.
- Shorten it. Trim the start and end. Reaction GIFs work best at two or three seconds anyway, and every second you cut is a second of frames you don't store.
- Drop frames. Many GIFs run at 20 to 30 frames per second. Cutting to 10 or 15 keeps the motion readable and can roughly halve the size. Fast motion gets choppy, slow motion barely changes.
- Reduce colors. Going from 256 colors to 128 or 64 shrinks the file further. Flat graphics survive this well; photos show banding in skies and skin.
Some tools also offer a "lossy" setting, which lets the encoder change pixels slightly so they compress better. Gifsicle has one, and most online GIF compressors use something similar. Small amounts are hard to spot; large amounts look grainy.
How do you do it with free tools?
Most free GIF editors and online compressors offer resize, trim, frame-skip and color settings, and the command-line tool Gifsicle handles all of them in one line.
If you're comfortable with a terminal, Gifsicle is fast and precise. This command resizes to 600 pixels wide, limits the palette to 128 colors and applies light lossy compression:
gifsicle -O3 --resize-width 600 --colors 128 --lossy=40 input.gif -o smaller.gif
Check the manual for your version before relying on a specific option, since flags have been added over the years. On a phone, GIF editing apps offer the same controls under names like "resolution", "speed", "frame rate" and "quality".
Keep a copy of the original. Each pass of compression loses detail, so it's better to start again from the source than to squeeze an already-squeezed file.
When should you post a video instead?
If the GIF still doesn't fit or looks rough after shrinking, a short MP4 of the same clip is usually much smaller and sharper.
Video codecs store only what changes between frames, so a three-second clip as an H.264 MP4 can be a fraction of the size of the same clip as a GIF, with full color. X plays short videos in the timeline much like GIFs. The trade-off is that a video shows player controls and is counted as a video post, not a GIF.
With FFmpeg, converting a GIF to an X-friendly MP4 looks like this:
ffmpeg -i input.gif -movflags +faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" output.mp4
The scale filter makes sure the width and height are even numbers, which H.264 needs. If you made the clip yourself, skip the GIF entirely and export the video directly; our video export guide covers the settings.
How do the options compare?
Resizing and converting to MP4 usually save the most, while color and lossy settings fine-tune what's left.
| Change | Typical saving | Visible cost |
|---|---|---|
| Halve width and height | Large | Less detail on big screens |
| Cut length by half | About half | Shorter loop |
| 25 fps down to 12 fps | Large | Choppier fast motion |
| 256 colors down to 64 | Moderate | Banding in gradients |
| Light lossy setting | Moderate | Slight grain |
| Convert to MP4 | Often very large | Shows as a video |
The savings depend heavily on the content, so use the table to decide where to start and measure the result yourself. After each change, check the result in the checker again. When the GIF is under 5 MB and inside the size and frame limits, it should post from both the apps and the web. Add a short description while you're at it; our alt text guide covers how to describe a GIF.
Questions
What is the GIF size limit on X?
X's Help Center lists 15 MB for animated GIFs posted from the web and 5 MB from the mobile apps. The developer documentation also lists 1280 × 1080 pixels and 350 frames as maximums.
Why does my GIF post from the website but not from my phone?
The mobile limit is lower. A GIF between 5 MB and 15 MB fits the web limit but not the app limit, so posting it from x.com in a browser often works where the app refuses it.
Will X keep my GIF as a GIF?
X re-encodes the media it receives, so what viewers see is X's own copy rather than your exact file. That is one more reason not to spend effort on very high quality settings.
Can I post a GIF together with photos?
No. X allows one GIF per post, and it can't be combined with photos or a video in the same post.
Sources
- X Help Center: Posting GIFs and pictures
- X developer documentation: Media
- Gifsicle manual
- FFmpeg documentation
X limits in this guide were last checked on November 6, 2026. X is a trademark of X Corp.; twittLoad is independent and not affiliated with X Corp.