AutoGallery is a simple PHP web app for presenting images, videos and other files with some special features.
- images
- optional display of IPTC fields
- lightbox with slideshow, fullscreen & download option
- videos
- display chapters and subtitles
- nice 3D effect on mouse hover
- optional password protection
- dark mode
- Copy all files onto your web server.
- Copy your files (images, videos and other files; sub-directories possible) into the
media
dir. - Create
conf.php
fromconf.php.example
.
Optional: change values:- change gallery title in
const TITLE
- set a password in
const PASSWORD
(can also be an array with multiple passwords) - set which IPTC fields should be shown in
const PHOTO_TITLE
andconst PHOTO_SUBTITLE
- change gallery title in
The application supports symlinks which allows you to create easy-to-read URLs. Example: you have a folder called "Holidays June 2014". You can create a symlink via ln -s "Holidays June 2014" "holidays2014"
so you can share the simpler URL https://gallery.example.com/holidays2014
with your friends. The web app still shows the nice name "Holidays June 2014" as headline even when accessed via shortlink.
You can display a descriptive text to each folder by creating a file index.html
in your media folder with the desired HTML content.
You can hide folders the common Unix way by adding a "." at the beginning of the folder name. The folder is still accessible!
Video subtitles and chapters are read from .vtt files. If you want to add such to a video, you need to create a folder with the same name as the video file (without file extension). Inside this folder, place your .vtt files with the following file name schema.
- Subtitles:
subtitles.<LANGCODE>.vtt
, e.g.subtitles.de.vtt
- Chapters:
chapters.<LANGCODE>.vtt
If you want to show a custom thumbnail, place a file called thumbnail.jpg
in this folder.
A file tree could look like this:
media/
- myvideo.mp4
- myvideo/
-- subtitles.en.vtt
-- subtitles.de.vtt
-- chapters.en.vtt
-- thumbnail.jpg
Bonus: if available, you can extract embedded chapters from video files with ffprobe
from ffmpeg using the chapters.py
script:
python3 chapters.py video.mov > chapters.en.vtt
If you want to capture user statistics, you need to create a MySQL/MariaDB database and import the database schema from sql/SCHEMA.sql
. Then, enter your database credentials in the STAT_DB_*
constants in conf.php
. And all requests will be logged into that database.