tldraw_create_asset
Create an asset record for images, videos, or bookmarks to obtain an asset ID needed for adding shapes like images or videos.
Instructions
Create an asset record (image, video, or bookmark). Use the returned asset ID with shape creation tools like tldraw_create_image or tldraw_create_video.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| h | No | Height in pixels (for image/video) | |
| w | No | Width in pixels (for image/video) | |
| src | Yes | Source URL or data URI for the asset | |
| type | Yes | Asset type | |
| title | No | Title (for bookmark assets) | |
| fileName | No | Original file name | |
| mimeType | No | MIME type (e.g. 'image/png') | |
| description | No | Description (for bookmark assets) |