Media
Upload reusable image assets with useful alt text and safe deletion behavior.
vibecms stores uploaded images as site-scoped assets and returns both an asset ID and a public media URL.
Upload
The supported formats are JPEG, PNG, WebP, and GIF. The decoded file must be 10 MB or smaller.
Always provide concise alt text that describes the useful visual content. A featured or inline image without useful alt text can block publication.
Use an asset
- Set
coverAssetIdto use the image as a featured image. The cover is also the post’s share image (Open Graph / X card). For a post without a cover, the share image falls back in order: a generated 1200 × 630 post card in the blog’s theme (needs card generation enabled and a title the card fonts can draw), then the site default social image if one is set, then a generated home card. With generation disabled and no site default, no share image is set. - Insert the returned
/media-assets/<assetId>URL in Markdown for an inline image. - Reuse an existing suitable asset instead of uploading duplicates.
Delete
assets.delete is destructive and requires the separate assets:delete scope. The Write drafts, Write and publish, and Manage key levels do not grant this scope. It returns CONFLICT while the asset is referenced anywhere: a post cover, an inline /media-assets/... image in Markdown, any saved post version, or the site’s social image, logo, or favicon. Removing the image from the current draft is not enough while a saved version still references it. Confirm deletion immediately before the call.
Visibility
Uploaded media is public at its /media-assets/<assetId> URL as soon as the upload completes — a draft or private preview link does not make its images private. Only upload images you are comfortable publishing.