Getting Started
QuickstartConceptsRecommended SetupsAuthenticationAPIs
Delivery APIOutbound WebhooksLogsIngest WebhookImagesErrorsLibraries
TypeScript SDKReference
Plans and LimitsImages
Images sent with an article are copied to Copper CMS and served from the CDN.
Cover Image
The cover is sent beside the article, as a url. On the source page, map coverImage.url to the field the partner sends it in.
POST https://api.coppercms.com/v1/hook/8f2c…c1a9.k3Rd… content-type: application/json { "id": "post-1041", "title": "A post from the partner", "body": "<p>The body.</p><img src=\"https://img.partner.example/chart.png\" alt=\"Q3\">", "image": { "url": "https://img.partner.example/hero.jpg", "alt": "The harbour" } }
Other fields can sit beside the url, such as coverImage.alt. They are kept as sent.
Images in the Body
Nothing needs mapping. Every image in the body is copied: an <img> in HTML,  in Markdown, an image node in TipTap JSON. The alt text and the title stay on the image.
Inline Images
An image with no public url can be sent inside the article, as a data:image/…;base64, url, in the body or as the cover. It is decoded instead of fetched, then stored and served like any other image. The article names a cdn.coppercms.com url for it, never the data.
POST https://api.coppercms.com/v1/hook/8f2c…c1a9.k3Rd… content-type: application/json { "id": "post-1042", "title": "A post with an inline chart", "body": "<p>The body.</p><img src=\"data:image/png;base64,iVBORw0KGgo…\" alt=\"Q3\">", "image": { "url": "data:image/jpeg;base64,/9j/4AAQSkZJRg…", "alt": "The harbour" } }
The data has to be base64. Inline images count toward the request. The whole request is held to one megabyte. Send a large image as a url.
A refusal names an inline image by the type alone, such as data:image/png;base64,…, rather than repeating the data.
What Arrives
Each image is fetched when the article arrives, before the response. It is decoded and encoded again. That applies the rotation a phone camera records and drops the rest of the metadata, location included. Every image is stored as WebP.
The article then names the copy. The cover carries the image size. A page can lay it out before the image loads.
"coverImage": { "url": "https://cdn.coppercms.com/images/8f2c…c1a9/3b1e….webp", "alt": "The harbour", "width": 1600, "height": 900 }
In bodyHtml, each src points at cdn.coppercms.com in the same way.
Sending an Article Again
An image is copied once per url. Sending the article again, or another article with the same image, reuses the copy and stores nothing new.
An inline image is copied once per content. The same data sent again reuses the copy. Changed data is a new image.
A changed image needs a new url. A file replaced at the same url keeps the copy that was made first.
A url already on cdn.coppercms.com is left as it is.
When an Image Cannot Be Copied
The article is refused. Nothing of it is written. The response names the image and the reason.
400 Bad Request { "error": "image could not be stored: https://img.partner.example/chart.png: the host answered 404" }
| Case | Answer |
|---|---|
| The host does not answer in time | 400 |
| The host answers with an error | 400 |
| The file is not an image | 400 |
| The file is too large | 400 |
| A private or local address | 400 |
| A relative url | 400 |
| Too many images | 400 |
| The account storage is full | 402 |
Fix the image and send the article again. The images copied before the failure are kept. The next send fetches only the rest.
A refused article is kept for the source page, like any other refusal. A payload refused before the images, for a missing title or a site it cannot reach, fetches nothing.
Limits
| Largest Image | 10 MB |
|---|---|
| Images Copied per Send | 50 |
| Time per Image | 10 seconds |
| Time per Send | 30 seconds |
| Redirects Followed | 3 |
| Longest URL | 2,048 characters, not counting inline images |
| Largest Request, Inline Images Included | 1 MB |
An article past a limit is refused. Copies count toward storage, the same as uploads in the console. See Plans and Limits.
