Resize
resize scales media to the project canvas while preserving the asset aspect ratio.
type ResizeMode = "contain" | "cover";
| Value | Behavior |
|---|---|
contain | Fits the full asset inside the canvas. |
cover | Fills the canvas and may crop the asset. |
resize is supported for IMAGE, VIDEO, and GIF elements.
note
HTML/TEXT elements (and the deprecated SVG element) use explicit width and
height instead of resize. Although resize may pass API validation for SVG,
it is not applied during rendering.
Example
{
"type": "IMAGE",
"src": "https://cdn.example.com/photo.jpg",
"resize": "cover",
"position": "center-center"
}