UtilityNest
X (Twitter) logo

X (Twitter) image, GIF and video size limits

X takes images up to 5 MB, animated GIFs up to 15 MB, and videos up to 8 GB and 20 minutes for standard accounts or 16 GB and 125 minutes with Premium.

5 MB Checked 2026-11-08
Or try:

The limits

WhatLimit
ImageJPG, PNG, WEBP, up to 8192 x 8192 px, 4 per post.5 MB
Animated GIF15 MB
Video (standard account)Minimum 0.5 s.8 GB, up to 20 min
Video (Premium)16 GB, up to 125 min
Video in direct message1 GB and 10 min with Premium.512 MB, 140 s

Your account decides the video limit

X's developer documentation is clear that video limits follow the person posting, not the app. Without X Premium, a video on a post can run from 0.5 seconds to 20 minutes and be up to 8 GB. With Premium or a verified account, the same video can run up to 125 minutes and 16 GB. Images (5 MB) and animated GIFs (15 MB) have the same limits for everyone.

Direct messages are much tighter. A video in a DM is limited to 140 seconds and 512 MB on a standard account, or 10 minutes and 1 GB with Premium. A clip that posts fine to your timeline can still be refused when you try to send it privately.

Upload and posting are checked separately

The documentation warns that a file can upload successfully and still be rejected when it is attached to a post. The posting step re-checks the duration and size against the posting user's entitlement. If the video is too long, the error says: This user is not allowed to post a video longer than N minutes, where N is 20 for standard accounts and 125 for Premium.

This is why a long video can show 100% uploaded in a scheduling tool and then fail at the last moment. Check the length first, not after the upload.

GIFs: the 15 MB limit is not the only one

X says a GIF can fail when the post is created even if it is under 15 MB, and it gives three more constraints that improve the success rate.

  • Resolution of 1280 x 1080 or less (width x height).
  • No more than 350 frames.
  • No more than 300 million pixels in total, counted as width x height x number of frames.
  • A post can hold up to 4 photos, or 1 animated GIF, or 1 video, never a mix.

A worked example of the pixel budget

A 1280 x 720 GIF has 921,600 pixels per frame. At 20 frames per second, a 20-second clip has 400 frames, which is already over the 350 frame limit, and 368.6 million pixels, over the 300 million budget. The same clip at 960 x 540 and 15 frames per second has 300 frames and 155.5 million pixels, comfortably inside every limit. Lowering the frame rate and the size together is the fastest fix.

Video settings X recommends

For the smoothest result, X recommends H.264 High Profile at 30 or 60 fps with AAC-LC audio. High-Efficiency AAC is not supported, and audio must be mono or stereo, not 5.1. The video must use progressive scan, square pixels, 4:2:0 color and no open GOP, with an aspect ratio between 1:3 and 3:1. X also notes that subscribed users can upload 1080p video and get 1080p playback, while unsubscribed users upload and play back at 720p.

Fixing each kind of rejection

  • Image over 5 MB: /resize-image-to-kb at 4900 KB keeps it under the limit with a margin. Photos compress far better as JPG than PNG.
  • GIF over 15 MB or over the frame and pixel limits: /compress-gif with its defaults (75% size, 15 fps, 128 colors).
  • Video too long for your account: cut it with /trim-video before uploading.
  • Video for a DM: trim to 140 seconds and compress with /compress-video to an exact limit of about 500 MB if needed.

Our test: a GIF that broke three X limits at once

We made a 20-second animated test GIF at 1280 x 720 and 20 fps (400 frames, 18,696,950 bytes). It was over the 15 MB size limit, the 350 frame limit and the 300 million pixel budget. We opened /compress-gif in Chromium and clicked Compress GIF with the default settings.

File size18.7 MB7.39 MB (7,391,349 bytes)
Resolution1280 x 720960 x 540
Frames400300
Total pixels (w x h x frames)368.6 million155.5 million
Time in the browserabout 14 seconds

The defaults alone brought every figure inside X's GIF rules with room to spare. If you need the GIF larger on screen, keep 100% size and drop to 10 fps instead; check that frames times pixels stays under 300 million.

Error messages and what to do

This user is not allowed to post a video longer than N minutes.

The video is longer than the posting account's limit (20 minutes, or 125 with Premium). The upload itself may have succeeded.

Trim the video to the limit, or post from an account with Premium.

A GIF under 15 MB still fails

It is over 1280 x 1080, over 350 frames, or over 300 million total pixels.

Reduce size and frame rate with /compress-gif.

A video posts publicly but will not send in a DM

DM videos are limited to 140 seconds and 512 MB without Premium.

Trim to 140 seconds, or share a link to the post instead.

A video with surround sound or HE-AAC audio fails

Audio must be AAC-LC, mono or stereo.

Export again from your editor with stereo AAC-LC audio, or turn on Remove sound in /compress-video if the clip does not need audio.

Questions people ask

Why do some sites still say 512 MB and 2:20 for posts?

Those were the old post limits. In X's current documentation they apply only to videos in direct messages on standard accounts.

Can I mix a photo and a video in one post?

No. X allows up to 4 photos, or 1 GIF, or 1 video per post.

Will a 4K video look sharper on X?

X recommends 1280 x 720 for standard accounts; Premium accounts get 1080p playback. A 4K upload is processed down, so export at 1080p to save upload time.

Also checked for this guide

Make your file fit

Each button opens the tool already set to this limit. Files are processed in your browser.

Good to know

  • Older guides still quote 512 MB and 2 minutes 20 seconds for posts. X's current developer documentation lists the larger figures above.
  • Images over 5 MB are the most common failure. Save screenshots as PNG only when they contain text; photos should be JPG.

Sources

More social media limits