ImageElement
Documentation for the ImageElement schema definition in the Polotno Design JSON Schema.
ImageElement
Type Information
Base Type: object
Properties
Property | Type | Description |
---|---|---|
alwaysOnTop | boolean | Whether element stays on top of others. |
animations | Array<Animation > | Animation configurations. |
blurEnabled | boolean | Whether blur effect is enabled. |
blurRadius | number | Blur radius in pixels. |
borderColor | string | Border color. |
borderSize | number | Border width in pixels. |
brightness | number | Brightness level (-1 to 1). |
brightnessEnabled | boolean | Whether brightness effect is enabled. |
clipSrc | string | URL or data URI for clipping mask. |
contentEditable | boolean | Whether element content can be edited. |
cornerRadius | number | Corner radius in pixels. |
cropHeight | number | Crop height as percentage (0-1). |
cropWidth | number | Crop width as percentage (0-1). |
cropX | number | Crop X offset as percentage (0-1). |
cropY | number | Crop Y offset as percentage (0-1). |
custom | unknown | Custom data attached to the element. |
draggable | boolean | Whether element can be dragged. |
filters | object | Applied image filters. |
flipX | boolean | Whether image is flipped horizontally. |
flipY | boolean | Whether image is flipped vertically. |
grayscaleEnabled | boolean | Whether grayscale effect is enabled. |
height | number | Height in pixels. |
id | string | Unique identifier for the element. |
keepRatio | boolean | Whether to maintain aspect ratio when resizing. |
name | string | Display name for the element. |
opacity | number | Opacity level (0-1). |
resizable | boolean | Whether element can be resized. |
rotation | number | Rotation angle in degrees. |
selectable | boolean | Whether element can be selected. |
sepiaEnabled | boolean | Whether sepia effect is enabled. |
shadowBlur | number | Shadow blur radius in pixels. |
shadowColor | string | Shadow color. |
shadowEnabled | boolean | Whether shadow is enabled. |
shadowOffsetX | number | Shadow horizontal offset in pixels. |
shadowOffsetY | number | Shadow vertical offset in pixels. |
shadowOpacity | number | Shadow opacity (0-1). |
showInExport | boolean | Whether element appears in exports. |
src | string | URL or data URI of the image file. |
stretchEnabled | boolean | Whether stretch mode is enabled. |
styleEditable | boolean | Whether element style can be edited. |
type | "image" | Element type identifier. |
visible | boolean | Whether element is visible. |
width | number | Width in pixels. |
x | number | X position in pixels. |
y | number | Y position in pixels. |
JSON Schema
{
"additionalProperties": false,
"properties": {
"alwaysOnTop": {
"description": "Whether element stays on top of others.",
"type": "boolean"
},
"animations": {
"description": "Animation configurations.",
"items": {
"$ref": "#/definitions/Animation"
},
"type": "array"
},
"blurEnabled": {
"description": "Whether blur effect is enabled.",
"type": "boolean"
},
"blurRadius": {
"description": "Blur radius in pixels.",
"type": "number"
},
"borderColor": {
"description": "Border color.",
"type": "string"
},
"borderSize": {
"description": "Border width in pixels.",
"type": "number"
},
"brightness": {
"description": "Brightness level (-1 to 1).",
"type": "number"
},
"brightnessEnabled": {
"description": "Whether brightness effect is enabled.",
"type": "boolean"
},
"clipSrc": {
"description": "URL or data URI for clipping mask.",
"type": "string"
},
"contentEditable": {
"description": "Whether element content can be edited.",
"type": "boolean"
},
"cornerRadius": {
"description": "Corner radius in pixels.",
"type": "number"
},
"cropHeight": {
"description": "Crop height as percentage (0-1).",
"type": "number"
},
"cropWidth": {
"description": "Crop width as percentage (0-1).",
"type": "number"
},
"cropX": {
"description": "Crop X offset as percentage (0-1).",
"type": "number"
},
"cropY": {
"description": "Crop Y offset as percentage (0-1).",
"type": "number"
},
"custom": {
"description": "Custom data attached to the element."
},
"draggable": {
"description": "Whether element can be dragged.",
"type": "boolean"
},
"filters": {
"additionalProperties": {
"additionalProperties": false,
"properties": {
"intensity": {
"description": "Filter intensity value (-1 to 1).",
"type": "number"
}
},
"required": [
"intensity"
],
"type": "object"
},
"description": "Applied image filters.",
"type": "object"
},
"flipX": {
"description": "Whether image is flipped horizontally.",
"type": "boolean"
},
"flipY": {
"description": "Whether image is flipped vertically.",
"type": "boolean"
},
"grayscaleEnabled": {
"description": "Whether grayscale effect is enabled.",
"type": "boolean"
},
"height": {
"description": "Height in pixels.",
"type": "number"
},
"id": {
"description": "Unique identifier for the element.",
"type": "string"
},
"keepRatio": {
"description": "Whether to maintain aspect ratio when resizing.",
"type": "boolean"
},
"name": {
"description": "Display name for the element.",
"type": "string"
},
"opacity": {
"description": "Opacity level (0-1).",
"type": "number"
},
"resizable": {
"description": "Whether element can be resized.",
"type": "boolean"
},
"rotation": {
"description": "Rotation angle in degrees.",
"type": "number"
},
"selectable": {
"description": "Whether element can be selected.",
"type": "boolean"
},
"sepiaEnabled": {
"description": "Whether sepia effect is enabled.",
"type": "boolean"
},
"shadowBlur": {
"description": "Shadow blur radius in pixels.",
"type": "number"
},
"shadowColor": {
"description": "Shadow color.",
"type": "string"
},
"shadowEnabled": {
"description": "Whether shadow is enabled.",
"type": "boolean"
},
"shadowOffsetX": {
"description": "Shadow horizontal offset in pixels.",
"type": "number"
},
"shadowOffsetY": {
"description": "Shadow vertical offset in pixels.",
"type": "number"
},
"shadowOpacity": {
"description": "Shadow opacity (0-1).",
"type": "number"
},
"showInExport": {
"description": "Whether element appears in exports.",
"type": "boolean"
},
"src": {
"description": "URL or data URI of the image file.",
"type": "string"
},
"stretchEnabled": {
"description": "Whether stretch mode is enabled.",
"type": "boolean"
},
"styleEditable": {
"description": "Whether element style can be edited.",
"type": "boolean"
},
"type": {
"const": "image",
"description": "Element type identifier.",
"type": "string"
},
"visible": {
"description": "Whether element is visible.",
"type": "boolean"
},
"width": {
"description": "Width in pixels.",
"type": "number"
},
"x": {
"description": "X position in pixels.",
"type": "number"
},
"y": {
"description": "Y position in pixels.",
"type": "number"
}
},
"required": [
"alwaysOnTop",
"animations",
"blurEnabled",
"blurRadius",
"borderColor",
"borderSize",
"brightness",
"brightnessEnabled",
"clipSrc",
"contentEditable",
"cornerRadius",
"cropHeight",
"cropWidth",
"cropX",
"cropY",
"draggable",
"filters",
"flipX",
"flipY",
"grayscaleEnabled",
"height",
"id",
"keepRatio",
"opacity",
"resizable",
"rotation",
"selectable",
"sepiaEnabled",
"shadowBlur",
"shadowColor",
"shadowEnabled",
"shadowOffsetX",
"shadowOffsetY",
"shadowOpacity",
"showInExport",
"src",
"stretchEnabled",
"styleEditable",
"type",
"visible",
"width",
"x",
"y"
],
"type": "object"
}