替换/上传图片
xiumi_set_imageReplace an image slot in a Xiumi component with a local file or network URL; the image is uploaded to Xiumi hosting and written into the layout.
Instructions
把组件内第 slotIndex 个图片槽替换成指定图片。支持本地文件(filePath)或网络图片(url);图片会先上传到秀米图床再写入排版。
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": {
"compId": "<compId>"
},
"name": "xiumi_set_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | 网络图片 URL | |
| compId | Yes | 组件 ID,来自 xiumi_get_comps / xiumi_insert_template | |
| filePath | No | 本地图片绝对路径(png/jpg/gif/webp) | |
| slotIndex | No | 图片槽序号,从 0 开始,默认 0 |