Visual asset management for Vite
npm install vite-plugin-asset-manager

A visual asset management dashboard for Vite projects.
Discover, browse, and manage all your media assets through a real-time web UI.
Installation •
Usage •
Features •
Configuration •
Shortcuts
---
``bash`
npm install vite-plugin-asset-manager -Dor
pnpm add vite-plugin-asset-manager -Dor
yarn add vite-plugin-asset-manager -D
`ts
// vite.config.ts
import { defineConfig } from 'vite'
import AssetManager from 'vite-plugin-asset-manager'
export default defineConfig({
plugins: [AssetManager()],
})
`
Start your dev server and access the Asset Manager in three ways:
- Visit /__asset_manager__/ directly in your browser⌥⇧A
- Press (Option+Shift+A) to toggle the floating panel
- Click the floating icon button injected into your app (drag to reposition)
| Feature | Description |
|---------|-------------|
| Fully Responsive | Mobile-first design that works seamlessly from 320px to 4K+ displays |
| Asset Discovery | Automatically scans and catalogs images, videos, audio, fonts, documents, and data files |
| Real-time Updates | File changes reflected instantly via Server-Sent Events |
| Floating Icon | Draggable & resizable overlay panel with keyboard shortcuts (⌥⇧A), snaps to all 4 edges |
| Mobile Optimized | Touch-friendly UI with 44×44px tap targets, bottom sheet preview, drawer navigation |
| Automatic Theming | Light/dark mode support based on system preferences |
| Thumbnail Generation | Sharp-powered thumbnails with dual-tier caching |
| Import Tracking | See which files import each asset with click-to-open-in-editor |
| Duplicate Detection | Content-based deduplication using MD5 hashing |
| Advanced Filtering | Filter by size, date modified, and file extension |
| Bulk Operations | Multi-select for batch download (ZIP), copy paths, or delete |
| Keyboard Navigation | Full keyboard support with vim-style bindings |
| Context Menu | Right-click for quick actions (copy, reveal in Finder, delete, etc.) |
| Performance | Code splitting reduces main bundle to 75 KB, lazy loading for optimal speed |
| Accessibility | WCAG 2.1 Level AAA compliant with reduced motion support |
| Framework | Status | Notes |
|-----------|--------|-------|
| Vanilla | ✅ | Fully automatic |
| Vue | ✅ | Fully automatic |
| React | ✅ | Fully automatic |
| Preact | ✅ | Fully automatic |
| Lit | ✅ | Fully automatic |
| Svelte | ✅ | Fully automatic |
| Solid | ✅ | Fully automatic |
| Qwik | ✅ | Fully automatic |
| TanStack Start | ✅ | Manual setup required |
For SSR frameworks (Next.js, Remix, Nuxt, SvelteKit, Solid Start), manual script injection is required. See the SSR Integration Guide for setup instructions.
`ts`
assetManager({
base: '/__asset_manager__', // Dashboard URL path
include: ['src', 'public'], // Directories to scan
exclude: ['node_modules', '.git', 'dist'],
thumbnailSize: 200, // Thumbnail dimensions (px)
floatingIcon: true, // Show toggle button in host app
watch: true, // Enable real-time updates
launchEditor: 'code', // Editor: code, cursor, webstorm, vim, etc.
})
| Type | Extensions |
|------|------------|
| Image | png jpg jpeg gif svg webp avif ico bmp tiff heic |mp4
| Video | webm ogg mov avi |mp3
| Audio | wav flac aac |pdf
| Document | doc docx xls xlsx ppt pptx |woff
| Font | woff2 ttf otf eot |json
| Data | csv xml yml yaml toml |md
| Text | txt |
| Action | Shortcut |
|--------|----------|
| Navigate grid | ← ↑ → ↓ or j/k |/
| Focus search | |Escape
| Close preview | |Space
| Toggle selection | |Enter
| Open preview | |⌘A
| Select all | / Ctrl+A |⌘C
| Copy paths | / Ctrl+C |⌘O
| Open in editor | / Ctrl+O |⌘⇧R
| Reveal in Finder | / Ctrl+Shift+R |Delete
| Delete | / Backspace |
The plugin exposes REST endpoints at {base}/api/:
View all endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| /assets | GET | List all assets |/assets/grouped
| | GET | Assets grouped by directory |/search?q=
| | GET | Search by name/path |/thumbnail?path=
| | GET | Get image thumbnail |/file?path=
| | GET | Serve original file |/stats
| | GET | Asset statistics |/importers?path=
| | GET | Files importing the asset |/duplicates?hash=
| | GET | Assets with matching content hash |/open-in-editor
| | POST | Open file in editor |/reveal-in-finder
| | POST | Reveal in system file explorer |/bulk-download
| | POST | Download as ZIP |/bulk-delete
| | POST | Delete multiple assets |/events
| | GET | SSE stream for real-time updates |
`bash
pnpm install # Install dependencies
pnpm run build # Build UI + plugin
pnpm run dev # Watch mode