# X media checker

PubNio checks X files for format, size, and count before it publishes, for the X post. An X post with GIF 12 MB, PNG 1.5 MB fails: "X accepts one GIF by itself." Platform docs read 2026-12-05.

## Tool

Pick a placement, then list files by format and size.

- X post, GIF 12 MB: passes.
- X post, GIF 12 MB, PNG 1.5 MB: `media_count`: "X accepts one GIF by itself."

## Rules it applies

- X post: accepts JPEG, PNG, GIF, WebP, MP4, MOV; up to 4 images of up to 5 MB, or one video of up to 512 MB, not both. 5 images: "X posts accept up to 4 images." No files: passes as a text post.
- A GIF goes alone and may reach 15 MB. This checker reads video size only; once PubNio has probed a stored video, one longer than 140 seconds fails with `media_duration`: "X videos must run at most 140 seconds."
- PubNio's media library stores video up to 5 GiB and other files up to 256 MiB; each placement's own cap above still applies.

## What X documents

| Item | Platform documents | PubNio enforces | Source |
| --- | --- | --- | --- |
| Images | 5MB; JPG, PNG, GIF, WEBP | 5 MB; JPEG, PNG, GIF, WebP | [X API: Upload Media](https://docs.x.com/x-api/media/upload-media), read 2026-12-05 |
| GIF size | 15MB | 15 MB | [X API: Media best practices](https://docs.x.com/x-api/media/quickstart/best-practices), read 2026-12-05 |
| Attachments per post | 4 attachments; another official page says 20 attachments ([X API: Create or Edit Post](https://docs.x.com/x-api/posts/create-post), read 2026-12-05) | 4 images, 1 GIF, or 1 video | [X API: Media best practices](https://docs.x.com/x-api/media/quickstart/best-practices), read 2026-12-05 |
| Video length in a post | 0.5 seconds to 20 minutes | 140 seconds at most | [X API: Media best practices](https://docs.x.com/x-api/media/quickstart/best-practices), read 2026-12-05 |
| Video length in a DM | 0.5 to 140 seconds | Not checked | [X API: Media best practices](https://docs.x.com/x-api/media/quickstart/best-practices), read 2026-12-05 |

Where the two columns differ, the tool applies PubNio's value, because that is what PubNio checks before it publishes.

## Limits

- It runs in your browser and sends nothing to PubNio.
- Duration, resolution, aspect ratio, and codecs are not checked here; the network can still refuse a file that passes.

## Sources

- [X API: Upload Media](https://docs.x.com/x-api/media/upload-media), read 2026-12-05
- [X API: Media best practices](https://docs.x.com/x-api/media/quickstart/best-practices), read 2026-12-05
- [X API: Create or Edit Post](https://docs.x.com/x-api/posts/create-post), read 2026-12-05

## Related

- [X character counter](https://pubnio.com/tools/x-character-counter)
- [X API media rules](https://pubnio.com/docs/providers/x/media/)
- [X publishing API](https://pubnio.com/platforms/x)
- [All media checkers and planners](https://pubnio.com/tools)

