Skip to content

axAilotl/SillyTavern-Gallery-Pro

Repository files navigation

SillyTavern Gallery Pro

A React-based gallery extension for SillyTavern with grid view, lightbox, sorting, and upload support.

Screenshots

Grid View Lightbox View Gallery Interface

Features

  • Grid View: Responsive thumbnail mosaic with filenames
  • Lightbox View: Full-screen viewer with navigation controls
  • Video Support: MP4, WebM, OGG, MOV, AVI, MKV playback
  • Sorting: By name (A-Z, Z-A) or date (newest, oldest)
  • Upload: Add images/videos directly from the gallery
  • Delete: Remove files with confirmation
  • Keyboard Navigation: Arrow keys + Escape
  • Lazy Loading: Thumbnails load on demand

Installation

  1. Clone into SillyTavern/public/scripts/extensions/third-party/
  2. Run:
    npm install
    npm run build
  3. Restart SillyTavern

API

// Open gallery
window.SillyTavernGalleryPro.open(
    items,           // [{src: 'url'}]
    initialIndex,    // Starting index (default: 0)
    onDelete,        // Async delete callback (optional)
    onRefresh,       // Async refresh callback (optional)
    galleryFolder    // Upload folder name (optional)
);

// Close gallery
window.SillyTavernGalleryPro.close();

// Check if open
window.SillyTavernGalleryPro.isOpen();

Example

const images = [
    { src: '/user/images/char1/image1.png' },
    { src: '/user/images/char1/image2.jpg' },
];

// Basic
window.SillyTavernGalleryPro.open(images);

// With callbacks
window.SillyTavernGalleryPro.open(
    images,
    0,
    async (url) => { /* delete handler */ },
    async (sortOrder) => { /* refresh handler */ },
    'character_name'
);

Keyboard Shortcuts

Key Action
/ Navigate
Escape Close lightbox / gallery

Building

npm install
npm run build

License

AGPL-3.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5