Skip to main content

Image API Reference

kittl.design.image — add and update raster images.

Scope: design:state:write

addImage(params)

Adds a new image to the canvas.

PropertyTypeRequiredDescription
srcstringYesImage source URL or objectName
positionAbsolutePosition | RelativePositionYesPlacement on canvas
size{ width, height, applyViewportScale? }NoDimensions
objectPropertiesImagePropertiesNoOptional styling (angle, flip, opacity, fill, stroke, shadow)

Returns: SdkResultAsync<NormalizedIllustrationImageObject>

updateImage(params)

Updates properties of an existing image.

PropertyTypeRequiredDescription
idstringYesID of the image to update
leftnumberNoX position
topnumberNoY position
widthnumberNoWidth in pixels
heightnumberNoHeight in pixels
objectNamestringNoImage source reference
strokestringNoStroke color
strokeWidthnumberNoStroke width in pixels
shadowOptionsobjectNoFull shadow configuration
shadowColorstringNoShortcut to set just the shadow color

ImageProperties

Optional styling properties passed via objectProperties when adding an image:

PropertyTypeDescription
anglenumberRotation in degrees
flipX / flipYbooleanFlip horizontally/vertically
hiddenbooleanVisibility
opacitynumberOpacity (0–1)
fillColorInfo[]Fill array (each entry has key, value, visible)
strokestringStroke color
strokeWidthnumberStroke width in pixels
shadowOptionsobjectShadow configuration