exportPreview

abstract suspend fun exportPreview(block: DesignBlock): ByteBuffer

Exports a small image of a block to show in your app. A preview does not count as an export.

The image is always WebP at quality 0.8 and keeps the block's aspect ratio. A block larger than 262,144 pixels (512 × 512) in area is scaled down to fit. For a video, the preview is one still frame. Use export for a file that you deliver. Performs an internal update to resolve the final layout for the blocks. Will not complete as long as assets are in a pending state; asset loading progresses during engine updates.

Return

the WebP image.

Parameters

block

the design block element to preview.