Node.js CLI to generate dark-themed HTML slideshows from a folder of images and videos
npm install image-slideshow-cli---
.png, .jpg, .jpeg, .webp, .gif) and optionally generates:- A stunning interactive HTML slideshow with thumbnails, autoplay, and keyboard controls
- A high-quality WebM video slideshow (VP9) using ffmpeg
- A dedicated show-video.html page that embeds the video full-screen with native controls
Perfect for quick portfolios, presentations, social media sharing, or archival backups.
---
bash
npm install -g image-slideshow-cli
`Then run anywhere:
`bash
image-slideshow -f ./photos
`> Requires Node.js ≥ 14
> For video export: ffmpeg must be installed and in your PATH
---
Usage
`bash
image-slideshow -f [options]
`$3
`bash
Just the HTML slideshow
image-slideshow -f ./vacationHTML slideshow + WebM video + video viewer page
image-slideshow -f ./vacation -vCustom title, autoplay, and longer image duration in video
image-slideshow -f ./vacation -v -t "Summer 2025" -a 4 --duration 5 --quality high
`---
Options
| Option | Alias | Description | Default |
|-------------------------|-------|--------------------------------------------------|--------------------|
|
--folder | -f | Folder containing images | (Required) |
| --output | -o | Output HTML slideshow filename | slideshow.html |
| --title | -t | Title shown in both slideshow and video page | Image Slideshow |
| --autoplay | -a | Autoplay interval in HTML slideshow (0 = off) | 5 |
| --pattern | | Comma-separated extensions (no dots) | png,jpg,jpeg,webp,gif |
| --video | -v | Generate both WebM + MP4 + show-video.html | false |
| --video-output | | Output video filename | slideshow.webm |
| --duration | | Seconds each image is shown in video | 3 |
| --fps | | Frames per second for video | 30 |
| --quality | | Video quality: low │ medium │ high | medium |
| --background-music |-b| path to background music file (mp3, wav, ogg, etc.)|None|---
New: WebM Video Features (-v)
When you add the
-v flag, the tool generates three files:`
/your-folder/
├── photo1.jpg
├── photo2.webp
├── slideshow.html ← Interactive image slideshow
├── slideshow.webm ← High-quality VP9 WebM video
└── show-video.html ← Beautiful full-screen video player (auto-opens)
`$3
- Full-screen responsive video
- Autoplay + loop + muted (mobile-friendly)
- Native browser controls
- Dark theme with header/footer
- Link back to the image slideshow$3
| Level | CRF | Bitrate | Best For |
|---------|-----|---------|------------------------------|
| low | 35 | ~500kbps| Fast encoding, small file |
| medium| 23 | ~1Mbps | Great balance (default) |
| high | 15 | ~2Mbps | Maximum quality |---
Features
- Dark Tailwind Theme – Modern, elegant UI
- Fully Responsive – Looks great on phones, tablets, desktops
- Keyboard Navigation –
← → Space
- Thumbnail Grid – Jump instantly to any image
- Zero Dependencies (except optional ffmpeg)
- Video Export – Share as a single file
- Auto-open Results – Both HTML pages open automatically---
Example Commands
`bash
Quick slideshow only
image-slideshow -f ./galleryFull package: slideshow + high-quality video
image-slideshow -f ./gallery -v -t "My Portfolio 2025" --quality high --duration 6Fast video for social media
image-slideshow -f ./memories -v --quality low --duration 2 --fps 24Only PNG/WEBP images, custom output name
image-slideshow -f ./art -v --pattern png,webp -o gallery.html
`---
Output Structure (with
-v)`
./your-folder/
├── image1.jpg
├── image2.png
├── ...
├── slideshow.html ← Interactive viewer
├── slideshow.webm ← Video file
└── show-video.html ← Full-screen video player (opens automatically)
`---
Requirements for Video Export
Make sure
ffmpeg is installed:`bash
macOS
brew install ffmpegUbuntu/Debian
sudo apt update && sudo apt install ffmpegWindows
Download from: https://ffmpeg.org/download.html
or use: choco install ffmpeg
``---
MIT License © 2025
Mohan Chinnappan