Interface: ApiImageConfigSettings
Configuration settings for image generation.
This interface controls how product images are generated in different contexts throughout the configurator. It specifies image format, size, background color, and camera positioning to ensure consistent, high-quality visualizations.
These settings can be customized for different use cases like thumbnails, detail views, and AR previews to optimize both quality and performance.
Properties
backgroundColor?
optionalbackgroundColor?:string
Background color for the image.
For JPEG images, this color fills the background. For PNG images with transparency, this may affect edge anti-aliasing.
Must be a valid hex color code (e.g., '#FFFFFF' for white).
customCameraPosition?
optionalcustomCameraPosition?:string
Specific camera position for image capture.
Optional JSON pose used instead of the product's saved scene camera:
alpha, beta, position, target, and/or radius.
null and a missing value use the saved scene camera. {width, height} is ignored here;
that shape belongs on customCanvasSize.
Example: {"position":{"x":-1.5,"y":1.7,"z":-5.2},"target":{"x":0,"y":0.6,"z":0},"radius":5.5}
customCanvasSize?
optionalcustomCanvasSize?:Partial<Dimensions>
Custom dimensions to override default canvas sizing.
When provided, these dimensions override the default aspect ratio and calculated height. This may affect how the product appears within the frame.
Use with caution as it may cause the product to appear partially out of frame unless combined with withAutozoom.
extension?
optionalextension?:"png"|"jpg"|"jpeg"
File format for generated images.
Determines the image format and associated MIME type:
- 'png': Lossless format with transparency support
- 'jpeg'/'jpg': Compressed format without transparency
PNG is ideal for images that need transparency or highest quality, while JPEG is better for smaller file sizes and faster loading.
forceTopDown?
optionalforceTopDown?:boolean
Capture this image from a top-down orthographic camera. Only the screenshot camera is moved. Off by default.
hiddenMeshes?
optionalhiddenMeshes?:ApiImageHiddenMesh[]
Meshes to hide only while this image is generated.
The meshes are hidden before the camera is framed and dimensions are measured, so the image is framed on what stays visible. They are shown again as soon as the image is captured; the live configurator does not change.
Useful for parts that suit the configurator but not the image, such as a floor shadow plane on a dark image background.
Example: [{ modelName: 'Sauna_R_shadow.glb', meshName: 'shadow' }]
keepFrontAngle?
optionalkeepFrontAngle?:boolean
Keeps the product facing the front in the screenshot after more pieces
are added, and still fits it in the frame. Use it with withAutozoom.
Off by default.
size?
optionalsize?:number
Width of the generated image in pixels.
When withAutozoom or withCameraReset is on and customCanvasSize does not set a height,
the height is size * 3/4. When both are off, the height follows the canvas aspect ratio.
Larger sizes produce higher quality images but require more processing time
and bandwidth.
Note: On iOS devices, sizes larger than 2048px may cause performance issues. For e-commerce use, 1000-1200px is typically recommended.
withAutozoom?
optionalwithAutozoom?:boolean
Automatically adjusts zoom to ensure the product fits the canvas.
When true, the camera will automatically zoom out to ensure the entire product is visible within the image.
In the normal 3D view this adjusts the perspective zoom. In the top-down plan,
this restores the zoom from when the plan first opened and stays top-down,
unless withCameraReset is also true.
This is particularly useful with customCanvasSize to prevent cropping.
withCameraReset?
optionalwithCameraReset?:boolean
Resets the camera to a standard position before capturing.
When true, the screenshot camera uses the product's saved scene camera, including its saved zoom,
or customCameraPosition when that value includes camera fields. null uses the saved scene camera.
Zoom is not adjusted unless withAutozoom is also true. The camera on screen is not moved.
In the top-down plan this leaves the plan. Pass false to keep the current view.
This has to be enabled to use customCameraPosition.