A module for Foundry VTT that lets players zoom and pan on images in documents.
  • JavaScript 83.9%
  • CSS 16.1%
Find a file
2026-10-10 18:30:03 +02:00
foundry-vtt-autorelease@167c4b41c1 Add autoversion and update README.md 2026-10-10 18:30:03 +02:00
scripts Update to set max width on link 2026-07-04 16:07:56 +02:00
styles Revert custom image window title split 2026-07-04 15:07:25 +02:00
.gitmodules Add autoversion and update README.md 2026-10-10 18:30:03 +02:00
module.json Add autoversion and update README.md 2026-10-10 18:30:03 +02:00
README.md Add autoversion and update README.md 2026-10-10 18:30:03 +02:00

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).
  • maxWidth limits the initial popout width in pixels (clamped to 50–8192). max-width=1400 or a bare 1400 also work.