ScreenshotNeo

BlogGuides

Twitter Image Size Limits: File Types, Dimensions, and Upload Caps

A current guide to X image formats, file-size caps, dimensions, aspect ratios, GIF limits, profiles, Media Studio, and ads.

By the ScreenshotNeo team1 October 20267 min read

Short answer: For a normal X (Twitter) photo post, use JPEG, PNG, or GIF and keep each photo at or below 5 MB. Animated GIFs can be up to 5 MB on mobile and 15 MB on the web. X does not publish one universal maximum pixel dimension for every ordinary timeline photo. Other workflows have different rules: profile photos are recommended at 400×400 pixels and under 2 MB, headers at 1500×500 pixels, Media Studio images can reach 20 MB and 8192×8192 pixels, and ads have their own format and ratio specifications.

Quick reference: X image limits by workflow

Workflow Accepted formats File-size limit Dimensions or ratios Where it applies
Regular photo post JPEG, PNG, GIF Photos up to 5 MB No single universal pixel ceiling published for ordinary timeline photos Consumer X posting
Animated GIF in a post GIF 5 MB mobile; 15 MB web Follow the aspect-ratio guidance below Consumer X posting
Profile photo JPEG, GIF, PNG Under 2 MB Recommended 400×400 Profile settings
Header image Use an image supported by X Follow the profile/header upload form Recommended 1500×500 Profile settings
Media Studio JPG, PNG Up to 20 MB Up to 8192×8192 Media Studio only
X Ads PNG, JPEG Up to 5 MB Supported ratios include 1:1, 1.91:1, 16:9, 9:16, 4:5, and 2:3 Ads creative workflow

These limits belong to separate upload paths. Do not apply the Media Studio ceiling or ad ratios to an ordinary post without checking the relevant interface. See the X Help Center guidance for photos and GIFs, the profile settings guidance, and the Media Studio FAQ.

Regular X posts: formats and file-size caps

JPEG, PNG, and GIF are accepted

X accepts GIF, JPEG, and PNG for regular photo posts. JPEG is usually practical for photographs because it produces smaller files. PNG is useful for screenshots, diagrams, and images that need sharp edges or transparency. GIF is the option when the image must animate.

Photo limit: 5 MB

Keep a regular photo at or below 5 MB. This is a byte-size rule, so an image can fail even when its pixel dimensions look reasonable. Export again at a lower JPEG quality, reduce unnecessary metadata, or resize a very large source when the file is too large.

Animated GIF limit depends on the client

X states that animated GIFs can be up to 5 MB on mobile and up to 15 MB on the web. If your audience may upload from both clients, keeping the GIF at or below 5 MB avoids the stricter mobile cap.

Dimensions and aspect ratios for timeline photos

X’s current consumer help does not publish one universal maximum pixel dimension for every ordinary timeline photo. Treat the 5 MB limit and the display ratio as the practical constraints, then preview the result in the same client your audience uses.

For a single photo, X says an aspect ratio between 2:1 and 3:4 is displayed in full. Ratios outside that range can be cropped in the timeline. If the edges of a chart, product screenshot, or text graphic matter, place the important content toward the center and preview it before publishing.

A post can contain up to four total media items. X describes combinations such as two photos, one GIF, and one video, with four items maximum in total.

Profile photo and header image sizes

Profile photo

  • Recommended dimensions: 400×400 pixels.
  • Accepted formats: JPEG, GIF, or PNG.
  • Keep the upload under 2 MB.

Use a square source and leave visual breathing room around a face, icon, or mark because the profile presentation may mask or crop the corners.

Header image

X recommends 1500×500 pixels for a header. Keep essential artwork away from areas that can be covered by the profile photo or account controls, and check the result on both mobile and desktop layouts.

Media Studio limits

Media Studio has a separate image specification: JPG or PNG files may be up to 20 MB, with a maximum resolution of 8192×8192 pixels. The Media Studio FAQ identifies these as Media Studio limits; they are not a replacement for the smaller limits in the normal consumer composer.

If an asset is intended for Media Studio, check both values before upload. A file can be below 20 MB and still fail if either dimension exceeds 8192 pixels.

X Ads image requirements

Ads use a dedicated creative workflow. X Ads recommends PNG or JPEG, rejects BMP and TIFF, and caps image files at 5 MB. Listed ratios include:

  • 1:1
  • 1.91:1
  • 16:9
  • 9:16
  • 4:5
  • 2:3

Select the ratio for the specific ad placement, then validate the file in Ads Manager. Do not assume that an image accepted as a regular post automatically satisfies an ad specification.

How to prepare an image before uploading

  1. Choose the workflow. Decide whether the asset is for a post, profile, header, Media Studio, or ad.
  2. Export a supported format. Use JPEG or PNG for still images; use GIF only when animation is required.
  3. Check bytes, not just pixels. Confirm the file is within the cap for that workflow.
  4. Set a suitable canvas. Use 400×400 for a profile image, 1500×500 for a header, or a 2:1-to-3:4 ratio for a single timeline photo you want displayed in full.
  5. Preview the crop. Inspect the image in the X composer and on a narrow viewport if the composition is important.
  6. Upload from the intended client. A web GIF allowance does not change the lower mobile GIF allowance.

Command-line checks

On systems with ImageMagick, these commands show dimensions and file size before upload:

identify image.png
ls -lh image.png

To create a 400×400 profile image while preserving the source’s proportions:

magick source.jpg -resize '400x400^' -gravity center -extent 400x400 -strip profile.jpg

To reduce a JPEG that is over the 5 MB post cap, lower quality gradually and check the resulting bytes:

magick source.jpg -strip -quality 82 post.jpg
ls -lh post.jpg

Keep the original source file so you can make a different export for Media Studio, ads, or a profile image.

Why X crops or rejects an image

Symptom Likely cause Fix
“File too large” on a normal photo The image exceeds 5 MB. Export a smaller JPEG, reduce dimensions, or remove metadata.
Animated GIF rejected on mobile The GIF is over the 5 MB mobile limit. Reduce frame count, dimensions, or color palette until it is 5 MB or less.
GIF works on web but not mobile Web allows up to 15 MB while mobile allows 5 MB. Target the mobile limit when sharing one file across clients.
Edges disappear in the timeline The single-photo ratio is outside 2:1 to 3:4 or the preview is cropped. Reframe the canvas and keep critical content centered.
Profile upload fails The file is 2 MB or larger, or the format is unsupported. Use JPEG, GIF, or PNG and keep it under 2 MB; start from 400×400.
Media Studio rejects a large image The file exceeds 20 MB or one dimension exceeds 8192 pixels. Check both the byte size and each pixel dimension.
Ad creative rejected BMP/TIFF format, over 5 MB, or an unsupported ratio. Export PNG or JPEG, stay under 5 MB, and use a listed ad ratio.

Performance, quality, and reliability tips

  • Prefer the smallest file that preserves detail. Smaller files upload faster and are less likely to hit caps.
  • Use PNG selectively. Screenshots and line art often benefit from PNG, while photographic images are commonly smaller as JPEG.
  • Design for the crop. Keep labels, faces, and chart endpoints away from the outer edge when the image ratio may change.
  • Make a client-specific export. A web animated GIF can fit under 15 MB yet fail on mobile; a Media Studio export can be valid there but too large for a regular post.
  • Keep source and delivery files separate. Store a high-resolution original and create constrained derivatives for each X workflow.

Or skip the browser setup

If you need a dependable preview of an image-sharing page, ScreenshotNeo captures a URL through one API request. Cookie banners, newsletter popups, and chat widgets are removed before the shot; bot checks, blank pages, timeouts, failed loads, and cache hits are not billed. Its MCP server lets AI agents take screenshots, and 1,000 screenshots a month are free with no card; paid plans start at $5 for 3,000 shots.

See the ScreenshotNeo API documentation for the available options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://help.x.com/en/using-x/posting-gifs-and-pictures -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://help.x.com/en/using-x/posting-gifs-and-pictures"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://help.x.com/en/using-x/posting-gifs-and-pictures' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Create a free ScreenshotNeo account with 1,000 screenshots per month and no card.

FAQ

What is the maximum pixel size for a normal X photo?

X’s current consumer help does not publish one universal maximum pixel dimension for every ordinary timeline photo. Use the 5 MB file cap and check the composer preview.

Can I upload a 20 MB image to a normal post?

No general rule says that you can. The 20 MB and 8192×8192 limits are specified for Media Studio, which has a separate workflow.

Is 1500×500 required for a header?

It is X’s recommended header template. Treat it as the starting canvas and preview the result across devices.

How many images can one post contain?

Up to four total media items, including photos, a GIF, or a video.

Should I follow the ad ratios for ordinary posts?

No. Ad ratios apply to the X Ads creative workflow. For a single ordinary photo, X describes a 2:1-to-3:4 range for full display.