Skip to main content
Version: 0.0.3

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
srcstringConditionalImage source URL or objectName; omit only when providing both width and height
width / heightnumberConditionalRequired together when src is omitted
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
strokestring | nullNoStroke color
strokeWidthnumberNoStroke width in pixels
shadowOptionsobjectNoFull shadow configuration
shadowColorstring | nullNoShortcut 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)
strokestring | nullStroke color
strokeWidthnumberStroke width in pixels
shadowOptionsobjectShadow configuration