Image Node
Upload, crop, export, and reuse image files on the canvas.
Image nodes are static media nodes for uploaded files and image outputs that already exist on the canvas. They render the current local preview, synced media reference, or saved source URL, then keep the file metadata and non-destructive display transform with the node.
What it stores
- The local preview fields, including
srcandblobKey, while the upload is available in the browser. - The durable R2-backed
mediaRefafter the file syncs. - File metadata such as
fileName,mimeType,naturalWidth,naturalHeight, andaspectRatio. - Optional
imageTransformdata for contain, cover, or crop display behavior.
Add or replace an image
Choose the Image node
Add an Image node from the canvas toolbar, or drag compatible image files into the canvas. Toolbar placement decodes the image before placement so the initial size can match the source aspect ratio.
Drop or select a file
The node accepts file picker selection and drag-and-drop. A hidden input limits picker choices to supported image MIME types, while the shared media validator rejects unsupported or oversized files before commit.
Let the preview and sync finish
Builder Studio stages a local preview first, then syncs the file to durable media storage. The node switches to the R2 display URL when the media reference is available.
Adjust the image
Resize the node, crop it from the selected-node toolbar, export the transformed result, or run background removal when the source is a raster image.
Supported files
| Format | MIME type | Notes |
|---|---|---|
| JPG | image/jpeg | Supported for upload, display, export, and background removal. |
| PNG | image/png | Supported for upload, display, export, and background removal. |
| GIF | image/gif | Supported for upload and display. |
| WebP | image/webp | Supported for upload, display, export, and background removal. |
| AVIF | image/avif | Supported for upload, display, and export when the runtime can decode it. |
| SVG | image/svg+xml | Supported for upload and display. Background removal is not available. |
Sizing and placement
Image nodes read native image dimensions before committing upload data. Builder Studio stores the natural width, natural height, and aspect ratio, then sizes the node to the true source pixels unless the image is larger than the canvas maximum. Large images are scaled down; small images are not upscaled.
- Drag placement keeps the native aspect ratio while the pointer defines the target frame.
- Existing image nodes preserve aspect-ratio resizing when the node has a valid stored
aspectRatio. - Legacy images without dimensions update their missing dimensions after the active image element loads.
Crop and transform
Cropping is non-destructive. The original media remains intact, while the node stores an imageTransform that controls how the source is displayed and exported.
- Select one Image node and use the crop button in the floating toolbar, or double-click the image surface, to enter crop editing.
- Drag the crop rectangle, edges, or corners. Hold Shift on a corner drag to preserve the crop rectangle aspect ratio.
- Press Enter or double-click the overlay to apply the crop. Press Escape to cancel.
- A full-frame crop clears
imageTransform; Reset crop also returns the node to the uncropped source. - Applying a crop reframes the node height from the crop aspect ratio so the selected image keeps its visible proportions.
{ "imageTransform": { "mode": "crop", "crop": { "x": 0.12, "y": 0.08, "width": 0.76, "height": 0.7 } }}contain, cover with an optional normalized focal point, and crop with normalized source x, y, width, and height. Use null or contain to clear a transform.Selected image actions
| Action | What it does | Availability |
|---|---|---|
| Remove background | Sends the current image, including an active transform, through the background removal pipeline and creates a new PNG Image node next to the source. | Editable raster images with a synced media reference. |
| Reset crop | Clears the active crop transform. | Editable image nodes that already have a crop. |
| Crop image | Opens or applies the crop editor. | Editable image nodes with a visible image. |
| Export image | Downloads a PNG. Synced media exports through the server route; local-only previews fall back to a browser canvas export. | Image nodes with a loaded source. |
| Expand image | Opens the selected image in the canvas lightbox. | Image nodes with a visible source. |
Background removal
Background removal works from the durable R2 media reference. If you click it before upload sync has finished, Builder Studio queues the intent and runs it when the synced reference arrives. The queue times out after 30 seconds if the media reference never becomes available.
- SVG files can be uploaded and displayed, but they are rejected by the background removal API because the operation requires raster input.
- Cropped or covered images pass the current transform, width, and height to the removal route so the output matches the visible image.
- The result is saved as a PNG, receives fresh natural dimensions, and is inserted as a separate Image node offset from the original.
Agent and API notes
Agents should treat Image nodes as media references, not generation requests. To update a visible crop through the node patch contract, writeimageTransform with normalized values between 0 and 1. Keep the original mediaRef unless the agent is intentionally replacing the underlying image asset.
Was this page helpful?