Images & media
Agents upload images the same way they change content: every upload is checked, cleaned, held for review when a rule says so, recorded and undoable.
Uploading an image
An agent calls upload_image (MCP) or POST /api/v1/sites/{site}/media (REST) with the file as base64 (or a data: URL) or an https URL for Lyntcast to download, plus alt text, and optionally a caption, a title, a crop and a format. Before anything is stored:
- The real type is checked by its bytes, never the file name: JPEG, PNG, WebP, GIF and AVIF are accepted. SVG is refused, because an SVG can carry scripts.
- An image sent inline as base64 can be up to 3 MB (a request can carry about 4.5 MB, and base64 is a third larger; a larger one is refused with HTTP 413). Send larger images as an https
url: downloads are up to 15 MB and limited to public addresses (never your internal network). Images with more than 40 million pixels are refused. - Camera and location metadata is removed (EXIF, GPS, XMP, IPTC), the image is turned upright from its camera orientation and re-encoded.
- It is resized to at most 2560 px on its longest side (or
max_width/max_height), optionally cropped to a slot and converted to WebP (format: "webp"). The result is at most 10 MB.
Crops: crop takes a preset (featured and og 1200×630, square 1080×1080, portrait 1080×1350, banner 1920×600, thumbnail 400×400, product 2048×2048), a size such as "1200x630", an aspect ratio such as "16:9", or { width, height, strategy }. The default strategy, attention, keeps the most interesting part (faces, detail, colour); entropy keeps the most detailed part; center crops the middle. A source smaller than the slot is never enlarged: it keeps the slot's shape at its own resolution, and the too small for its slot rule flags it.
The upload is then a change like any other (upload_media, content type media): it is checked against the rules and is applied, held for review or blocked. On its own an image upload is low risk, because it shows nowhere until a content change uses it. Retries are safe with an idempotency_key (or the Idempotency-Key header): the same request returns the original upload. Without a key, the same file with the same details from the same agent within ten minutes is treated as a retry too.
Until the upload is applied, the cleaned file is kept in Lyntcast's database so reviewers can see it. Once it is in the CMS, or the upload is rejected or cancelled, the stored copy is deleted. A staged image that no change uses is kept for 7 days, then its file is deleted (upload it again to use it). A paused agent, or a workspace over its monthly changes, is refused before the image is downloaded or processed.
Using an image in a post or product
upload_image returns a media_id (med_…). Use it in propose_change before or after the upload is applied:
- As a field value:
{"featured_media": {"$media": "med_…"}}(WordPress),{"images": [{"$media": "med_…"}]}(WooCommerce),{"media": [{"$media": "med_…"}]}(Shopify),{"feature_image": {"$media": "med_…"}}(Ghost), or any image field on Sanity, Contentful, Strapi, Payload, Webflow, Storyblok or Contentstack. Lyntcast writes what that CMS expects there (an attachment id, an asset reference, a URL…). - In HTML:
<img src="lyntcast-media:med_…" alt="…">. The CMS's URL replaces it.
The content change is checked together with its images (alt text, size, slot size), and reviewers see them on it. An image that has its own upload change (from upload_image) is approved on its own, under its own rules, routing and approvals: while that upload is still waiting, the content change is held with the finding uses an image that is waiting for approval, and it can't be approved until the image is (approving both together works: the image goes first). Approving a post never approves someone else's image. Images staged only for the post itself (by Lyntcast's own AI or a bulk publish) have no change of their own: they are reviewed on the post and uploaded first when it is applied, then the post is written with the real CMS id or URL. If writing the post fails, the images uploaded for it are deleted again and everything is left as it was, so the change can simply be retried. An image whose own upload was rejected, blocked or undone can't be used.
Alt text
Always send alt text that says what the image shows. To fix it later, set_image_alt (or POST /api/v1/sites/{site}/media/{id}/meta) proposes new alt text, caption or title for an image already in the CMS, by its media_id or the CMS's own id. It is checked and reviewed like any edit; undo puts the old text back, and refuses if someone changed it in the CMS since.
Image rules
The Essentials pack includes four image rules as warnings (they flag a change for a person to look at; they never block): alt text (missing, empty, a file name, or a word like “image”), oversized images (over 5 MB or 4000 px), hot-linked images (HTML showing images from other websites) and images too small for their slot (e.g. a featured image under 1200×630). See the rules reference. There is no automatic nudity or safety detection: a person reviews what the rules flag.
Review and undo
The inbox, the change page and client approval links show the image itself, its size in pixels and bytes, its alt text, how it was cropped and processed, and, when an image is replaced, the old and the new image side by side. While an image is waiting, it is served from Lyntcast only to members of the workspace (and, on a client link, only the images of the changes on that link), as the exact image type with no sniffing; SVG is never served.
Undoing an upload deletes the image from the CMS where the CMS allows it, and only once no change uses it: undo the applied changes that show it first, and reject or cancel the waiting (pending, scheduled or conflicting) ones, so nothing is left pointing at a deleted file. An undone image can't be used again: upload it again for a new media_id. Undoing a content change also removes the images it uploaded for itself.
What each CMS supports
| CMS | Uploads to | Image details | Delete (undo) |
|---|---|---|---|
| WordPress | Media library (wp/v2/media) | Alt text, caption, title | Yes (deleted permanently). Featured image: featured_media. |
| WooCommerce | WordPress media library | Alt text, caption, title | Yes. Product images: images: [{"$media": …}]. |
| Sanity | Image assets | Alt text, caption (description), title | Yes, unless documents still use it. Identical files are stored once: an existing asset is reused, keeps its own alt text, caption and title (the upload's are not applied, and the change says so), and is never deleted by undo. |
| Contentful | Assets (upload, process, publish) | Alt text (stored as description), title | Yes (unpublished, then deleted). |
| Strapi | Media library (/api/upload) | Alt text, caption | Yes. |
| Ghost | Image upload | None on the image: set feature_image_alt and feature_image_caption on the post | No: Ghost has no API to delete uploaded images, so undo leaves the file on the server and says so. |
| Payload | An upload-enabled collection (default media, detected) | Alt text | Yes. |
| Shopify | Files (staged upload) | Alt text | Yes. Product images: the media field. |
| Webflow | Site assets | Alt text, title | Yes. Image fields get {fileId, url, alt}. |
| Storyblok | Assets (signed upload) | Alt text, title | Yes. Asset fields get the asset object. |
| Contentstack | Assets (published to your environment) | Alt text (stored as description), title | Yes. File fields get the asset uid. |
| HubSpot CMS | Files | None on the file: set featuredImageAltText on the post | Yes. |
| HighLevel | Media library (upload) | None on the file: set imageAltText on the post | Yes. The cover image is the post's imageUrl. |
| Custom REST API | Not supported |
list_sites and GET /api/v1/sites tell agents what each site supports. A request can carry about 4.5 MB, so images over 3 MB go as an https url rather than base64.