A React-based gallery extension for SillyTavern with grid view, lightbox, sorting, and upload support.
- 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
- Clone into
SillyTavern/public/scripts/extensions/third-party/ - Run:
npm install npm run build
- Restart SillyTavern
// 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();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'
);| Key | Action |
|---|---|
← / → |
Navigate |
Escape |
Close lightbox / gallery |
npm install
npm run buildAGPL-3.0