Skip to main content

Interface: ApiImageConfigSettings

Defines the customizable settings for image generation

Properties

backgroundColor?

optional backgroundColor: string

If provided, will be used for background on jpeg file. Accepts only hex and hexa format.


customCameraPosition?

optional customCameraPosition: string

JSON string with custom camera position eg. {"position":{"x":-1.4827425522188151,"y":1.7029008083897266,"z":-5.265221131049244},"target":{"x":0,"y":0.600077748298645,"z":0},"radius":5.580080441792618}


customCanvasSize?

optional customCanvasSize: Partial<Dimensions>

If provided, it will overwrite current canvas size and change scene ratio. In result product may appear out of screen. If it happens please use withAutozoom option to zoom out product to fit canvas. It will also overwrite size and/or automatically calculated height.


extension?

optional extension: "png" | "jpeg" | "jpg"

Extension of generated image file. Based on that image has set proper MimeType. Accepts only png, jpg and jpeg.


size?

optional size: number

Width of image. Height will be set automatically based on canvas aspect ratio. On iOS powered mobiles it may cause reloads if size is bigger than 2k. We recommend 1k for ecommerce.


withAutozoom?

optional withAutozoom: boolean

If true, it will do zoom out on canvas to make sure product if fully visible.


withCameraReset?

optional withCameraReset: boolean

If true, it will reset camera to initial position. Depending if customCameraPosition is defined or not it will reset to this position or to the position from scene/product in which product was displayed on load.