> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# X

> Image and video media requirements for [X](/apis/post/social-networks/x-twitter), formerly Twitter

## Images

<ul>
  <li>Up to 4 images can be uploaded in a single Tweet.</li>
  <li>Max image size: 5 MB</li>
  <li>Supported formats: JPG, PNG, GIF, Animated GIF, and WEBP.</li>
  <li>Image dimensions must be >= 4x4 and \<= 8192x8192 px.</li>
  <li>Recommended Tweet sharing a single image: 1200 x 675 px.</li>
  <li>Recommended Tweet sharing two images: 700 x 800 px each image.</li>
  <li>Recommended Tweet sharing three images:</li>

  <ul>
    <li>Left image: 700 x 800 px.</li>
    <li>Right images: 1200 x 686 px.</li>
  </ul>

  <li>Tweet sharing four images: 1200 x 600 px each image.</li>
  <li>Recommended aspect ratio is 16:9.</li>
</ul>

## [Video](https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/uploading-media/media-best-practices)

<ul>
  <li>Up to 4 videos can be uploaded in a single Tweet.</li>
  <li>Max video size 512 MB</li>
  <li>Supported formats: MP4 and MOV.</li>
  <li>Maximum video resolution: 1280x1024 px.</li>
  <li>Recommended Video Codec: H264 High Profile.</li>
  <li>Recommended Video Resolution:</li>

  <ul>
    <li>Landscape 1280x720 px.</li>
    <li>Portrait 720x1280 px.</li>
    <li>Square 720x720 px.</li>
  </ul>

  <li>Frame rate must be 60 FPS or less.</li>

  <li>
    Duration must be between 0.5 seconds and 140 seconds. Please [see
    here](https://www.ayrshare.com/docs/apis/post/social-networks/x-twitter.md#long-video) for posting longer X
    videos up to 4 hours.
  </li>

  <li>Aspect ratio must be between 1:3 and 3:1.</li>
  <li>Must have 1:1 [pixel aspect ratio](https://en.wikipedia.org/wiki/Pixel_aspect_ratio).</li>
  <li>Audio must be mono or stereo, not 5.1 or greater.</li>
</ul>

> [!TIP]
>
> <ul>
>   <li>
>     Some video software creates MP4 files that are not compatible with X/Twitter. For example,
>     Camtasia versions older than 2019.0.9 create MP4 files that X/Twitter rejects. Please check
>     your video software for compatibility. See
>     [here](https://www.ayrshare.com/docs/apis/post/social-networks/x-twitter.md#x-video-compatibility) for more
>     information.
>   </li>
>
>   <li>
>     X might have an issue processing video media hosted on Dropbox or signed URLs (for example an
>     S3 signed URL). If you encounter an issue, we recommend using an alternative hosting provider
>     or [uploading directly](https://www.ayrshare.com/docs/apis/media/overview.md) to Ayrshare.
>   </li>
>
>   <li>
>     If you're using a video creation tool and you're having issues publishing your video, try
>     [re-encoding the video](https://www.ayrshare.com/docs/help-center/technical-support/video-publishing-fails.md).
>   </li>
> </ul>

## Video Thumbnail

Set a custom thumbnail (cover image) for X videos. The thumbnail is displayed before the video plays.

<ul>
  <li>Only one thumbnail image per video.</li>
  <li>Supported formats: JPEG, PNG, BMP, and WebP.</li>
  <li>Max image size: 5 MB</li>
  <li>Recommended dimensions: Match the video resolution (e.g., 1280x720 px for landscape, 720x1280 px for portrait).</li>
  <li>Recommended aspect ratio: Match the video aspect ratio (16:9 for landscape, 9:16 for portrait, 1:1 for square).</li>

  <li>
    See [Video Thumbnail](https://www.ayrshare.com/docs/apis/post/social-networks/x-twitter.md#video-thumbnail) for usage details.
  </li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.