Skip to main content

Introduction

Tokenizer 2

Overview

A layered, non-destructive token image editor for Foundry VTT.

Click any actor portrait to open the editor, compose a token from multiple image layers, frames, and rings, then export the result as a high-resolution PNG saved directly back to the actor. Supports both token image and avatar/portrait editing modes.


Features

Layered Editing

  • Non-destructive layer stack - reorder, hide, lock, duplicate, or delete layers at any time without affecting the original images.
  • Multiple layer types - image layers, frame/ring layers, painted alpha mask layers, and background layers.
  • Blend modes - Normal, Multiply, Screen, Overlay, Soft Light per layer.
  • Undo / Redo - 20-snapshot history (Ctrl+Z / Ctrl+Shift+Z).
  • Layer persistence - the editor state is saved to actor flags and restored the next time you open the editor.

Layer Adjustments

Each layer has independent controls for:

  • Brightness, Contrast, Opacity
  • Tint colour
  • Rotation, Scale (with aspect ratio lock), horizontal/vertical flip
  • Alignment helpers (centre horizontally / vertically)

Layer Effects

Optional procedural effects per layer:

  • Line Art - edge-detection outline with adjustable blur
  • Rim Light - configurable colour, size, and intensity
  • Vignette - adjustable intensity and size
  • Film Grain - adjustable intensity and grain size
  • Chromatic Aberration - RGB channel offset

Editing Tools

ToolDescription
Move / TransformManipulate and resize the layer.
Magic LassoQuick removal of similar coloured areas.
Freehand LassoDraw a freehand path to cut a region from the layer.
DeleteFeathered delete.
Clone / HealClone bits of the image to fix up your tokens.
Liquify / WarpWarp (pull pixels) or Blend/Smudge modes with adjustable brush size and strength.
Paint MaskPaint your own custom mask.

Mask System

Multiple masks can be stacked per layer:

  • Alpha / Mask Image - luminance-based mask from any image (white = visible, black = hidden)
  • Ring Shape - masks to inside or outside a configurable geometric ring
  • Frame Layer Mask - Inner Window (Ray Cast) - clips to the inner window of a frame layer
  • Frame Layer Mask - Outer Shape (Contour) - clips to the outer silhouette of a frame layer

Rings & Frames

  • Built-in frame browser with bundled frames (marble variants, ShadowDark, inner shadow)
  • Custom frames - add your own PNG/WebP frames
  • Favourites and Recent tracking in the frame browser
  • Programmatic rings - configurable circle, square, or hex shapes with stroke width, stroke colour, stroke opacity, glow colour, inner feather, and mask mode (decorative/clip inside/clip outside)
  • Disposition-based auto-ring - automatically applies a Friendly/Neutral/Hostile ring when first opening an actor
  • Foundry Dynamic Ring support - preview Foundry's native ring system without baking it into the export
  • Oversized ring allows the token to spill out into surrounding spaces.

Animated Tokens

  • Per-layer animation presets - give any static layer a looping preset: Rotate, Breathe, Pulse, Hue Cycle, Tint Cycle, Shimmer, Aura Pulse. Each has a Cycle (seconds) and Intensity slider.
  • Animated layer sources - drop a .webm, .mp4, or .gif onto the canvas to add it as a video-backed layer. The editor plays it during preview and bakes it into the final export.
  • Live preview - when any layer has animation, a Play/Pause button appears in the toolbar. The loop stops automatically on Save or Cancel.
  • Adaptive save format - if the composition has any animation, Save writes a looping .webm (VP9 by default, VP8 fallback). Fully static compositions keep the existing PNG/WebP output.

Caveats:

  • Dynamic Token Ring mode does not support video/animated images.
  • Wildcard tokens save as static images. Animated wildcard variants are not currently supported.
  • Animated export requires a browser with WebCodecs (all Chromium-based Foundry installs qualify). Without WebCodecs the save falls back to a static frame.

Clipboard & Paste

  • Paste images from the system clipboard (Ctrl+V) directly as a new layer
  • Pasted images are uploaded to a configurable paste folder

Wildcards

  • Detects wildcard token paths automatically
  • Saving creates a new numbered variant without changing the wildcard glob path

Batch Tokenize

  • Right-click any compendium pack to open the Auto Token Compendium dialog
  • Process all actors or only those without a token image
  • Mask source option lets you keep the auto-generated frame-ray mask or supply your own mask image via the Mask Browser; the chosen mask is applied as a custom mask on all content layers

Installation

Install via the Foundry VTT module browser or add the manifest URL directly to your world.

Compatibility: Foundry VTT V13+

System interactions

Pathfinder 2e: PF2e auto-scales token textures based on actor size (small actors render at 0.8x, others at 1.0x) via its flags.pf2e.autoscale token flag. For normal tokens, Tokenizer 2 leaves PF2e's autoscale on, so small-actor tokens may appear slightly smaller in-scene than in the editor preview - this is PF2e's intended behaviour. For oversized tokens, Tokenizer 2 sets flags.pf2e.autoscale = false so the 2x scale persists (otherwise PF2e would revert it on every data prep). To override either case manually, toggle the lock button next to the Scale slider in Foundry's token config Appearance tab.


Settings

Settings are available under Settings → Configure Settings → Tokenizer 2 → Configure.

Token Rings

SettingDescription
Auto-apply default ringAdd the disposition ring automatically on first open
Fit portrait inside ringScale portrait to fit within the ring's inner boundary
Friendly / Neutral / Hostile ring imagesPaths to ring PNGs used per disposition
Use Foundry Dynamic Ring by defaultUse Foundry's native ring instead of baking it
Use oversized ring by defaultEnable the oversized ring automatically on first open so the token spills into surrounding spaces

Save Locations

SettingDescription
PC Tokens FolderServer folder for PC token exports
NPC Tokens FolderServer folder for NPC token exports
Pasted Images FolderServer folder for clipboard pastes
Linked Token Name TemplateFilename template for sidebar/linked tokens ({{name}}, {{id}})
Unlinked Token Name TemplateFilename template for unlinked tokens ({{name}}, {{tokenId}})
PC Avatars FolderServer folder for PC avatar exports
NPC Avatars FolderServer folder for NPC avatar exports
Linked Avatar Name TemplateFilename template for linked avatars
Unlinked Avatar Name TemplateFilename template for unlinked avatars

For name templates you can use any field on the system model, for example in 5e you could use Token.{{name}}-{{system.source.rules}}-{{system.source.book}} to get the rules version and book code.

Background

SettingDescription
Auto-apply default backgroundAdd a background texture as the bottom layer on first open
Background ImagePath to the default background image
Auto-apply default color layerAdd a solid colour layer at the bottom of the stack on first open (sits beneath the background image if both are enabled)
Default ColorColour used for the auto-applied colour layer and as the starting colour for new colour layers added via the menu

Advanced

SettingDescription
Export Image SizeResolution of the exported PNG/WebP
Export Image FormatPNG or WebP
Image Proxy URLProxy prepended to external URLs to avoid CORS errors
Lightweight ModeKeeps intermediate results in memory only; layer stack is not saved to actor data

Animation

SettingDescription
Frames per secondAnimated token FPS (default 24)
Max durationHard cap on the animated loop length in seconds (default 3)
Bitrate (Mbps)Target WebCodecs bitrate (default 2 Mbps)
Export sizePixel dimensions of the animated token (default 512)
Video codecVP9 (recommended) or VP8
EncoderWhich registered encoder to use - defaults to core WebM; plugins may add more

Public Settings (world)

SettingDescription
Disable portrait clickOpen the default file picker instead of Tokenizer 2 on portrait click (Shift+click opens the opposite)
Per-user portrait click preferenceEach user can override the world default
Show sheet header buttonToggle the Tokenizer 2 button in actor sheet headers (default on)

Keyboard Shortcuts

ShortcutAction
DragPan viewport
Shift + DragMove active layer
ScrollZoom in / out
Shift + ScrollScale active layer
Alt + ScrollRotate active layer
Drag scale handleScale active layer
Drag rotation handleRotate active layer
Ctrl + ZUndo
Ctrl + Shift + ZRedo
Ctrl + VPaste image as new layer
Del / BackspaceCommit lasso selection as cut
EscapeCancel freehand lasso

License

Bundled open-source components

LibraryPurposeLicense
Magic WandFlood-fill used by the Magic Lasso toolMIT (c) 2014 Ryasnoy Paul
MediabunnyReading / writing / converting media files for animated token exportMPL-2.0 (c) 2026 Vanilagy and contributors