Media and attachments
Each variant can carry media alongside the text. Images attached to a publishable scope are sent to LinkedIn or X when the variant publishes, and so are videos on X. Other files stay with the post for team context.
Think of attachments in two groups:
| Attachment | What happens |
|---|---|
| Images on a LinkedIn variant | Published with that LinkedIn post. |
| Images on an X opening tweet or thread tweet | Uploaded to X and attached to that tweet. |
| A video on an X opening tweet or thread tweet | Uploaded to X, processed by X, and attached to that tweet. |
| Documents, audio, LinkedIn videos, or other files | Stored with the post as internal reference material. They do not publish yet. |
| Post-level attachments through the API | Stored for context unless a variant/tweet scope is provided. |
Upload a file
- Open the variant's tab on the post detail page.
- Add images in the media strip below the editor, or use Other files for reference files when that section is shown.
- Pick a file and wait for the upload to finish before scheduling or publishing.
The file uploads straight to storage and then appears with its name and preview. Use the preview to inspect it, the external-link icon to open the stored file, or the trash button to remove it. Images, videos, audio, and PDFs open in the browser. Any other file, such as HTML, SVG, a document or an archive, downloads instead. Deleting an attachment also deletes the stored file. Every upload is recorded in the post's activity log as an attachment_added entry.
Uploads in the app are scoped to the variant or tweet you are editing. Through the API you can also attach at the post level by omitting variant_id and tweet_id. The API flow is presign -> PUT the bytes -> register the attachment; see the API reference for the .../attachments/presign/ and .../attachments/ endpoints.
What publishes
LinkedIn publishes text plus supported images. X publishes text plus supported images or a video:
| Platform | Media behavior |
|---|---|
| Publishes JPEG, PNG, or GIF images attached to the LinkedIn variant. One image becomes a media post; multiple images become a multi-image post. Videos on a LinkedIn variant do not publish yet. | |
| X (Twitter) | Publishes the images or the video attached to the opening tweet or any follow-up tweet. Each tweet's media is checked before the first tweet is posted. |
Non-image files are still useful for briefs, source files, screenshots, legal notes, exports, or creative references a teammate needs while writing and reviewing. See Publishing for exactly what each platform receives.
Platform image limits
Each platform enforces its own counts, formats, and sizes. WriteMars checks these when you register the file, and again at publish time.
| Rule | X (Twitter) | |
|---|---|---|
| Images per scope | Up to 4 per tweet, or 1 GIF on its own | Up to 20 per variant |
| Formats | JPEG, PNG, WebP, GIF | JPEG, PNG, GIF |
| Per-image size | 5 MB | 8 MB |
| GIF size | 15 MB | 8 MB |
| GIF pixel budget | ≤ 1280×1080, ≤ 350 frames, ≤ 300M total pixels | ≤ 36,152,320 pixels (width × height × frames) |
Other non-image files also have to fit the server's overall upload cap (5 MB by default), whether or not they publish. X videos follow their own 512 MB limit, described below.
GIFs bound for X are uploaded in chunks and WriteMars waits for X to finish converting them before the tweet is created, so a GIF never posts as "The media could not be played." If X can't process a GIF, the publish fails with X's reason instead.
GIFs get an extra preflight: WriteMars reads the file's dimensions and frame count before it will register, because LinkedIn and X both silently drop an over-budget GIF instead of returning an error. If a GIF is too large it is rejected up front with a plain-language reason (for example, roughly how many frames would fit at that size), so you can resize it rather than watch a "published" post show no animation.
X video limits
Each X tweet can carry one video. The video has to be the only media on that tweet, so remove any images or GIF first. When you attach a video, WriteMars reads its length, frame rate, shape, and audio and rejects it right away if X would refuse it. You don't have to wait for the publish to fail.
| Rule | Limit |
|---|---|
| Videos per tweet | 1, with no images or GIF on the same tweet |
| Formats | MP4 or MOV |
| File size | 512 MB |
| Length | 0.5 seconds to 20 minutes |
| Frame rate | 60 fps or less |
| Shape | Between 1:3 (tall) and 3:1 (wide), at least 32×32 |
| Audio | AAC, mono or stereo (5.1 surround is rejected) |
For the smoothest result, export H.264 video with AAC audio at 30 or 60 fps, in 16:9, 9:16, or 1:1. A phone recording usually fits these limits as-is.
X processes a video after upload, and that can take a few minutes for longer clips. Because of that, a post with a video publishes in the background. Post now sets the variant to publishing right away, and it turns published once X has finished processing and the tweet is live. If X rejects the video during processing, the variant fails with X's reason.
Gotchas
- Storage must be configured on the server. On a self-hosted instance without an S3 bucket, uploads fail immediately with
s3_not_configured. The hosted app athttps://writemars.comhas storage configured. - Uploads are rate limited per person. Each person can start and register up to 120 uploads a minute, and attach up to 10 X videos a minute, since WriteMars checks every video before it registers. Past either limit the upload gets "Too many requests"; wait a minute and try again.
- Video publishes to X only. Videos on a LinkedIn variant and documents on any variant can be uploaded for context, but they are not sent to the platform yet.
- X media rules are per tweet. A tweet can carry up to four images, one GIF by itself, or one video by itself. Older X connections may need to reconnect before media upload works because media publishing requires the
media.writepermission. - LinkedIn image rules are per post. WriteMars supports up to 20 images on one LinkedIn variant.
- Publish errors are written for humans. When a platform rejects media, the failure explains what happened and what to do next, rather than surfacing the raw API error.
- Attachments do not block deleting the variant. Stored files are cleaned up when the attachment row is removed.