Image API Reference
kittl.design.image — add and update raster images.
Scope: design:state:write
addImage(params)
Adds a new image to the canvas.
| Property | Type | Required | Description |
|---|---|---|---|
src | string | Yes | Image source URL or objectName |
position | AbsolutePosition | RelativePosition | Yes | Placement on canvas |
size | { width, height, applyViewportScale? } | No | Dimensions |
objectProperties | ImageProperties | No | Optional styling (angle, flip, opacity, fill, stroke, shadow) |
Returns: SdkResultAsync<NormalizedIllustrationImageObject>
updateImage(params)
Updates properties of an existing image.
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID of the image to update |
left | number | No | X position |
top | number | No | Y position |
width | number | No | Width in pixels |
height | number | No | Height in pixels |
objectName | string | No | Image source reference |
stroke | string | No | Stroke color |
strokeWidth | number | No | Stroke width in pixels |
shadowOptions | object | No | Full shadow configuration |
shadowColor | string | No | Shortcut to set just the shadow color |
ImageProperties
Optional styling properties passed via objectProperties when adding an image:
| Property | Type | Description |
|---|---|---|
angle | number | Rotation in degrees |
flipX / flipY | boolean | Flip horizontally/vertically |
hidden | boolean | Visibility |
opacity | number | Opacity (0–1) |
fill | ColorInfo[] | Fill array (each entry has key, value, visible) |
stroke | string | Stroke color |
strokeWidth | number | Stroke width in pixels |
shadowOptions | object | Shadow configuration |