Import Asset
import_assetCopy binary files into your Remotion project's assets folder, auto-detect images/audio/fonts, and return public paths for staticFile(). Use for uploads needing project-ready asset paths.
Instructions
Copy files from any location (typically temp uploads) into the project's assets/ directory. Automatically detects the category (images, audio, fonts) from the file extension. Returns publicPath values ready for staticFile() calls. Also returns an assetTree showing all files in each asset folder. For binary assets only — use write_file for code files (.tsx, .ts, .css).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectPath": "<projectPath>",
"files": "<files>"
},
"name": "import_asset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | One or more files to import | |
| onDuplicate | No | "overwrite" (default) replaces existing files. "rename" appends -1, -2, etc. to avoid collision. | overwrite |
| projectPath | Yes | Absolute path to the Remotion project root |