Skip to main content
Version: 0.0.5

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

updateImageSource(params)​

Replaces an image's stored source.

PropertyTypeRequiredDescription
idstringYesImage ID
objectNamestringYesNew stored image source
keepObjectDimensionsbooleanNoKeep the existing object dimensions
flattenbooleanNoFlatten the source during replacement

See UpdateImageSourceParams for all options.

resetImageCrop(params)​

Resets the crop for the image identified by { id: string }. See ResetImageCropParams.

resetImageBackgroundRemoval(params)​

Resets background removal for the image identified by { id: string }. See ResetImageBackgroundRemovalParams.

These methods return SDK results; check isOk before using the updated object. Their exact result types are listed in the image API inventory.