- JavaScript 83.9%
- CSS 16.1%
| foundry-vtt-autorelease@167c4b41c1 | ||
| scripts | ||
| styles | ||
| .gitmodules | ||
| module.json | ||
| README.md | ||
Image Zoomer
"AI" disclosure
Some or all of the code in this repository was generated with the assistance of LLM-based tools.
AI-generated code is not automatically owned by the person who generated it. No claim of ownership is made over third-party code or material included in this repository.
If you believe any code in this repository infringes your copyright, please contact me with the relevant details and I will review the matter and remove the material if appropriate.
This repository is intended for personal use only. The code is provided "as is", without warranties of any kind. I accept no responsibility or liability for any damage, data loss, security issues or other consequences resulting from its use.
Use this code at your own risk. You have been warned.
About
A Foundry VTT module that adds zoom and pan to image popouts, plus an @Image text enricher for linking images directly from journals and other rich text.
It provides:
- Mouse wheel zoom centered on the cursor (from fit-to-window up to 4x)
- Click and drag to pan when zoomed in
- Double-click to reset to fit-to-window
- A zoom percentage indicator in the popout
- Initial popout sizing that fits the image to the screen
@Image[...]links that open the image in a shareable popout
Compatibility
- Foundry VTT 14
Installation
In Foundry VTT, go to Add-on Modules → Install module and enter the manifest url: https://code.chuggybumba.com/thanius/image-zoomer/raw/branch/master/module.json
Usage
Any image popout (e.g. Show Artwork, or images shown to players) gets zoom and pan automatically.
To link an image from a journal or other rich text, use the @Image enricher:
@Image[path/to/image.webp]
@Image[path/to/image.webp]{Button text}
@Image[path/to/image.webp]{Button text|maxWidth=1400}
- The text in
{...}is used as the link label and popout title (defaults to the image path). maxWidthlimits the initial popout width in pixels (clamped to 50–8192).max-width=1400or a bare1400also work.