Gallery Forge

unlisted

by Ephox1

Drag-and-drop images to build Bases-powered galleries. Thumbnails in your vault, originals stay put.

Updated 1mo agoMIT
View on GitHub

Gallery Forge

Drag-and-drop image galleries for Obsidian, powered by Bases.

Drop images, plugin generates thumbnails, creates individual templated notes, files them into a Bases-powered gallery. Originals stay wherever they are on disk (your vault stays lean), thumbnails live in the vault, everything is driven by user-configured presets pointing at user-chosen folders.

Features

  • Drag-and-drop entry creation with auto thumbnail generation (WebP, PNG, JPG, configurable max width and quality)
  • Base-first: every gallery is a .base file, with a built-in Base Builder that shows live YAML preview
  • Vault-lean originals: thumbnails go in your vault, originals are referenced by absolute path (no duplication)
  • Multi-gallery support: configure any folder as a gallery with its own template, filters, and frontmatter schema
  • Setup wizard: first-run flow picks a folder and configures everything inside it
  • Bulk import from a vault folder or an external folder on disk (desktop only for external)
  • Templater-aware: auto-detects Templater and hands off, with simple {{token}} replacement as a fallback
  • Normalize command: retroactively consolidates drifted image fields onto your canonical field, with dry-run and automatic backups
  • Broken-reference detection: banner appears on notes whose original file has moved
  • Base-mismatch warning: one-click rebuild if your base file uses a different image field than your preset

Installation

Manual install (current method)

  1. Download main.js, manifest.json, and styles.css from the latest release
  2. Copy them into <vault>/.obsidian/plugins/gallery-forge/
  3. Settings, Community plugins, enable Gallery Forge

BRAT (beta install)

BRAT auto-updates from this repo:

  1. Install BRAT from community plugins
  2. BRAT settings, "Add Beta plugin"
  3. Enter Ephox1/gallery-forge

Community plugins directory

Not yet submitted. Coming once the plugin has been beta-tested.

Quick start

  1. Enable the plugin. You see a welcome modal.
  2. Click Create my first gallery. The wizard walks you through:
    • Pick a folder in your vault
    • Confirm subfolder layout (Notes, Thumbnails, base file)
    • Choose a template: file, inline, or the built-in default
    • Pick an existing .base file or generate one via the Base Builder
    • Set fields: canonical image field, name field, categories, statuses, auto-tags
  3. After the wizard, the right sidebar shows the drop zone. Drag images in.

Drop flow

  • 1 file: single metadata modal (name, category, status, tags, advanced frontmatter)
  • 2+ files: batch modal with a per-row table and "apply to all" shortcuts

Names are pre-filled from the filename, title-cased, with underscores and hyphens replaced with spaces. You can edit freely before confirming.

Templater integration

Gallery Forge auto-detects the Templater plugin. If your template contains <% %> syntax and Templater is installed, the plugin creates the note, hands it to Templater for processing, then runs {{token}} replacement on the result.

If Templater is not installed, <% %> syntax passes through unchanged. Only the simple {{token}} replacement runs.

Simple tokens

TokenReplaced with
{{name}}Entered name
{{thumb_path}}Vault-relative thumb path
{{original_path}}Absolute path to original
{{date}}Today (YYYY-MM-DD)
{{iso_date}}Today (ISO 8601)
{{category}}Selected category
{{status}}Selected status
{{tags}}Comma-separated tags

Frontmatter injection always runs regardless of Templater, setting the canonical image field, name field, original-path, status, category, created-date, and merging tags.

Normalize command

Command: Gallery Forge: Normalize existing notes

Walks every note under a preset's notes folder and consolidates drifted image fields onto the canonical field. Useful when existing notes have inconsistent frontmatter.

  • Dry run is the default. You must explicitly toggle it off to write changes.
  • Creates a timestamped backup folder before writing.
  • Handles obsidian:// URL values, wikilink embeds ([[img.png]]), pipe-display syntax ([[img.png|300]]), and absolute OS paths.
  • De-prioritizes auto-thumbnail artifacts (thumbnails/resized/*_hash.webp).
  • Optional "clear drifted fields" sets fallback values to "" without removing keys.

Restore any run with Gallery Forge: Restore from backup.

Base Builder

Every gallery is a .base file. The Base Builder gives you:

  • View type (cards or table), name, image field, image fit, aspect ratio
  • Filter expression with common filter shortcuts
  • Sort field (file.* or any frontmatter field) and direction
  • Live YAML preview before saving
  • Refuses to overwrite existing base files without confirmation

Troubleshooting and support

FAQ

Will this duplicate my original images? No, the default original handling is "reference external path only." The thumbnail is copied into your vault; the original's absolute path is stored in frontmatter. You can switch to copy or move mode per-preset if you prefer everything inside the vault.

What happens if I move or delete the original? The thumbnail and note continue to exist. When you open the note, a banner appears noting the broken path, with a browse button to point at a new location.

Can I use this with my existing .base file? Yes. Pick "Use existing base file" in the wizard. Make sure its image: line uses note.{yourCanonicalField}. The plugin warns you on load if there is a mismatch.

Does it work on mobile? Core drop flow and in-vault bulk import work. External folder picker requires Electron (desktop).

Development

git clone https://github.com/Ephox1/gallery-forge.git
cd gallery-forge
npm install
npm run dev    # watch mode
npm run build  # production build

Copy main.js, manifest.json, and styles.css to your vault's .obsidian/plugins/gallery-forge/ to test.

Contributing

Issues and PRs welcome. Please:

  • File bugs using the bug report template
  • Test on a scratch vault before opening a PR
  • Keep changes minimal and focused

License

MIT. See LICENSE.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.