Rehost a site's external images locally
rehost_imagesDownload the external images a site references (e.g. from the old site it was rebuilt from), store them on this VibeDeploy site under assets/img/, and rewrite the HTML references to local paths so the site no longer depends on the original. Call this once AFTER deploying a site rebuilt with the Website Converter. Auto-detects the external image URLs from the site's own HTML; downloads are SSRF-guarded, size/count/time capped, and applied atomically (patch mode). Images already on a VibeDeploy platform domain are skipped.
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": {
"name": "<name>"
},
"name": "rehost_images"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Site name as shown by list_sites, whose external images are downloaded and stored on the site. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| siteId | Yes | ||
| failures | Yes | External image URLs that could not be rehosted (left untouched in the HTML). | |
| bytesHosted | Yes | ||
| imagesHosted | Yes | Number of external images downloaded and stored on the site. | |
| htmlFilesUpdated | Yes | Number of HTML files whose img references were rewritten to local paths. |