This project was created because I found it very frustrating that I couldn't find a useful open source PHP gallery that would just work and didn't require a lot of fiddling to show pictures and videos in a directory. The idea here is that all you need to do is point this at a directory and it will generate the thumbnails and then show you the pictures. If you have a directory with hundreds or thousands of pictures, it will take a bit for the script to generate all the thumbnails.
It's still a work in progress, and I'll add more documentation once I have productionalized the thing.
- Supports image file formats (jpg,jpeg,png,gif,webp,bmp,ico,apng)
- Supports video file formats (mp4,webm,ogg,ogv,3gp,qt,mov,qtff,avi)
- Supports audio file formats (mp3,opus,wav,flac,aac)
- Integrated video and audio player
- Integrated PDF viewer
- Visiting gallery autogenerates thumbnails for all images, videos, audio and PDF in gallery directory
- Dynamic pagination
- Resizeable thumbnail size reorders images
- Sort media Ascending/Descending by: modified date, date taken, size, name
- Filter Media by file type and grouping
- Lightbox viewer with button, arrow key and touch navigation
- Shows image and video metadata (including GPS data with Google Maps link integrated)
- Copy index.php to directory above where gallery of media is.
- Change
$base_dirto media directory - Change
$thumbs_dirto directory where thumbnails will be stored - (Optional) Update
$ffmpeg_pathand$ffprobe_pathto the right location if they aren't on the system path already. - (Optional) Update
$show_gps_coordsto true if you want to show google map links on images - (Optional) Add
'Display Name' => 'path/to/directory',for each wanted sub-directory to navigate to [still experimental, be warned] - (Optional) Add
'Google' => 'https://google.com',for each external link you want to add to the page.
Done!
- PHP 5.2=>
- Enable GD-support in PHP (enable via php.ini)
- ffmpeg (install and put in system path or use path directly)
- ffprobe (install and put in system path or use path directly)
- PDF.js (already added, no need to do anything)






