Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 3.4 KB

README.md

File metadata and controls

55 lines (41 loc) · 3.4 KB

PHP Instant Gallery

About:

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.

Features

  • 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)

Screenshots

  • Sort By Modified Date - Sort By Modified Date

  • Sort By Size and Change Thumbnail Size On The Fly - Sort By Size and Change Thumbnail Size On The Fly

  • Select Groups Of Files To Show - Select Groups Of Files To Show

  • Sort By Name - Sort By Name

  • Lightbox with Metadata Open - Lightbox with Metadata Open

  • Audio Player - Audio Player

  • PDF Viewer - PDF Viewer

How to use:

  1. Copy index.php to directory above where gallery of media is.
  2. Change $base_dir to media directory
  3. Change $thumbs_dir to directory where thumbnails will be stored
  4. (Optional) Update $ffmpeg_path and $ffprobe_path to the right location if they aren't on the system path already.
  5. (Optional) Update $show_gps_coords to true if you want to show google map links on images
  6. (Optional) Add 'Display Name' => 'path/to/directory', for each wanted sub-directory to navigate to [still experimental, be warned]
  7. (Optional) Add 'Google' => 'https://google.com', for each external link you want to add to the page.

Done!

Requirements: