Element Reference
Image Element
1. Shape
interface ImageClip extends BaseClip {
type: "image";
src: string | { $ref: string };
}2. Supported fields
src
- Type:
string | { $ref: string } - Required: yes
- Purpose: image URL or image asset reference
3. Current runtime behavior
srcsupports direct URLssrcsupports$reftransformworksstyle.borderRadiusworksstyle.objectFitworksstyle.filtersworks
4. style.objectFit
Supported values:
fillcovercontain
Meaning:
fill: force-stretch to the target box and may distortcover: keep aspect ratio and may cropcontain: keep aspect ratio and may leave empty space
Example:
{
"style": {
"objectFit": "cover"
}
}It can also be combined with filters:
{
"style": {
"objectFit": "cover",
"filters": [
{ "type": "blur", "value": 24 }
]
}
}5. Example
{
"type": "image",
"start": 0.5,
"duration": 4,
"src": { "$ref": "logo" },
"transform": {
"x": "85%",
"y": "10%",
"width": 220,
"height": 80
},
"style": {
"borderRadius": 16,
"objectFit": "contain"
},
"animations": [
{
"type": "fadeIn",
"duration": 0.5
}
]
}