Attach images to a post
attach_imagesAttach one or more images to a ContentIn post that is not published yet. IMAGES ONLY — JPG, PNG or WEBP, at least 200×200px, at most 8 MB each, and at most 5 per post. Video, GIFs, PDFs and document carousels are NOT supported and will be refused, so do not try to attach one. Pass each image either as a public url (ContentIn downloads it) or as a base64 string with its mime_type. Two or more images publish as a LinkedIn multi-image post, in the order you list them. mode 'replace' (the default) makes the post's images exactly this set and deletes the ones it had; mode 'append' keeps the existing ones and adds to them, up to the same total of 5. Attaching does not publish anything — call publish_post or schedule_post afterwards, and call list_posts to check what is attached.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'replace' (default) — the post's images become exactly these, and the previous ones are deleted. 'append' — keep what is there and add these, total still capped at 5. | |
| images | Yes | The images, in the order they should appear on LinkedIn. Exactly one of url or base64 per entry. Maximum 5. | |
| post_id | Yes | The ContentIn post id (from list_posts or write_post_in_my_voice). The post must not be published yet. | |
| alt_texts | No | Optional alt text per image, same order and same length as images. Describe what is actually in the picture, in the user's language, 300 characters or fewer. |