upload_image
Upload an image into a project by fetching a public http(s) URL server-side (the still-image counterpart of upload_clip). The worker downloads the .png/.jpg/.jpeg/.gif/.webp/.svg, stores it in the project's asset bucket, and returns { filename, sizeBytes, contentType } — pass the returned filename to add_image_layer. Use this when you already have a direct image URL; to search an openly-licensed image pool instead, use find_public_image. The url must be a direct, publicly-fetchable http(s) link (not an auth-walled page). SVGs are rejected if they carry a , an inline event handler, a , a javascript: URL, or an external resource reference — supply a static, self-contained SVG. Buffered in Worker memory, so capped at 16 MiB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Direct, publicly-fetchable http(s) URL of the image file (.png/.jpg/.jpeg/.gif/.webp/.svg). | |
| filename | No | Optional stored filename (.png/.jpg/.jpeg/.gif/.webp/.svg). Defaults to the basename of the URL path; sanitised to lowercase a-z0-9._-. | |
| projectId | Yes | Project to add the image to. |