swebsy_upload_asset
Upload a local image to the site's asset library and get the src for an image component. This is the only way to add your own screenshots, logos, and mockups instead of random stock photos.
Instructions
Upload a local image file into the open site's asset library and return the src to use on an image component. This is the ONLY way to get your own imagery (screenshots, logos, textures, mockups) into a site — an image with an empty src gets a random stock photo instead. Reads the file from the agent's own filesystem, so pass a path you can see (for example a screenshot you just captured). The asset is stored in the project and travels with static export and project JSON.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the image on the agent's machine. Allowed types: .png, .jpg, .jpeg, .webp, .gif, .avif, .svg. Max 10 MB — re-encode larger files first. Prefer .svg for logos and other flat vector art so it stays crisp at any size; uploaded SVG is sanitized (scripts and external references are stripped). | |
| filename | No | Optional display name in the asset library. Defaults to the file's own basename. |