Simple Image Gallery lists and display images by folder showing metadata like EXIF and IPTC from images.
All functionallity is build in PHP, JavaScript and SQL on top of a SQLite database.
This is heavyly inspired by Single File PHP Gallery, but build from scratch. Single File PHP Gallery is a nice out-of-the-box gallery app. But has it’s issues with handling larger collection of images (YES! I’m impatient).
My own collection holds more than 250,000 images. And I do NOT want to load that onto a webserver.
[!WARNING]
Do NOT any personal/private images online!!! This is not a security system - and you “share with the world” online!
Pros | cons |
---|---|
Fast loading | Manual rebuil and database load |
Keeps you originals away from the net | Max display width and height defined by database |
Watermarking in database | Requires resizing of ALL images |
[!TIP] If you put a watermark into your display images, the original are unaffected.
Take a look at the latest demo
List of subdirectories and individual images
Display an individual image
List IPTC and EXIF metadata
[!TIP] And it is up to YOU to enrich you images with metadata in IPTC format. Use Photoshop, Gimp, XnView, Geosetter, ExifTool .. or whatever tool you like. Check IPTC’s list of software
List EXIF technical data as array
index.php * The Gallery
version.txt * Version identification
LICENSE License
.
├───config * Configuration files.
├───css* Style Sheets.
├───database* Database file(s).
├───doc Documentation.
│ └───HTML Doxygen doc.
├───examples Examples for test run
├───icons* Icons for display.
│ └───.flags* National flags (in SVG).
├───js* JavaScripts.
├───lib* Function libraries.
├───sql SQLscript for administration.
└───util Utilities: rebuild, reindex.
[!CAUTION] The directories marked * will include a default .htaccess file for Apache servers to prevent users from poking in your data file.
Prepare you images in a folder structure (See: ./examples
) like this:
.
├───2023
│ ├───Giza
│ ├───Odense
│ └───Öland
│ ├───Borgholm1
│ └───Borgholm2
└───Externals
├───DanmarkSetFraLuften
└───OdenseBilleder
└───1943-08-19_Asylgade
php -S localhost:8083
http://localhost:8083/build.php
<img src='doc/sig_build_001.jpg' width='500px' height=auto style='border: 1px solid blue'>
<img src='doc/sig_build_002.jpg' width='500px' height=auto style='border: 1px solid blue'>
You can now test the gallery by:
http://localhost:8083/index.php
OR simply press the Test buttonSuppose that you want to build your own database ./database/xyz
with your own images from W:/gallery_test/
try setting the arguments to rebuild:
php util/rebuild.php -config:data:data_root="W:/gallery_test/" -config:database:file_name=./database/xyz.db
config:data:data_root
and config:database:file_name
are the paths to data in the configuration file ./config/config.json
So you can either set the arguments on the command line - OR edit the configuration file.
(Snap from the configuration file)
{
"data": {
"virtual_root": "./",
"data_root": "W:/gallery_test/",
"image_ext": [
"jpg",
"JPEG"
]
},
"database": {
"file_name": "database/data.db",
"image_ext": [
"jpg",
"JPEG"
]
}
}