Point images to local files
journal-rewrite-imagesReplace external CDN image URLs with local file paths in Foundry journal text pages. Run dry run first to preview changes before applying.
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". |