Point images to local files
journal-rewrite-imagesReplaces CDN-hosted image URLs in Foundry journal texts with local paths. Specify URL prefix and local folder; use dry run to preview changes first.
Instructions
Replace external image addresses in text pages with local paths, for imported adventures that load their images from a CDN. Every img whose src starts with urlPattern (ignoring case) gets localPrefix followed by the file name of the old address. Runs inside Foundry. Use dryRun first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Only report what would change, without writing (default false). Run this first. | |
| pageId | No | Only this text page. Omit for every text page of the journal. | |
| journalId | Yes | Id of the journal, from list-journals. | |
| urlPattern | Yes | The address prefix to replace, taken literally, e.g. "https://cdn.example.com/img/". | |
| localPrefix | Yes | The folder the file names go under, e.g. "Bilder/Kampagnen/Abenteuer". |