Media & Images
The Delivery API returns media as ready-to-render objects — resolved URLs plus dimensions and alt text. You never store or build URLs yourself.
Media fields
A field of type media stores an asset reference. In delivery responses it is resolved to an object (or an array when the field is multiple). A deleted asset resolves to null.
json
{
"id": "…",
"slug": "hello-world",
"data": {
"title": "Hello World",
"cover": {
"id": "a1b2c3",
"url": "https://cdn.wriven.com/projects/…/cover.jpg",
"alt": "Sunrise over the hills",
"width": 1200,
"height": 630,
"mime": "image/jpeg"
}
}
}Images inside rich text
Images placed in a richtext body are stored as reference nodes and hydrated the same way on delivery — each image node carries a resolved src plus dimensions, so you can render it directly from the ProseMirror JSON.
json
{
"type": "image",
"attrs": {
"assetId": "a1b2c3",
"src": "https://cdn.wriven.com/projects/…/inline.png",
"alt": "Diagram",
"width": 960,
"height": 540,
"mime": "image/png"
}
}// KEYS ONLYWriven stores object keys, never URLs. The public URL is built at read time — so a CDN, custom domain, or future image-transform layer can change without rewriting your content.
Optimizing in the consumer
No transform parameters are applied server-side yet. Use your framework's image pipeline (e.g. next/image) against the returned url/src and the provided width/height.