Skip to content

Media

Media = { alt: string; height?: number; kind: "image"; url: string; width?: number; } | { captions?: string; kind: "video"; name: string; poster?: string; src: string; } | { extension?: string; kind: "document"; name: string; sizeBytes?: number; url: string; }

Reads what a renderer needs from a delivered media value: an asset from the Ebitex Assets library, told apart by contract.externalId (ebitex-image, ebitex-video, ebitex-document), whose file carries its own URL and dimensions. Anything that is not a video or a document is read as an image.