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.
- Files and directories needed on web. If you only run it locally, just ignore.
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
- Run the PHP webserver:
php -S localhost:8083
- Opening a browser window with the address:
http://localhost:8083/build.php
- On the form press Create database and the database will be created and populated:
You can now test the gallery by:
- Opening a new browser window/tab with the address:
http://localhost:8083/index.php
OR simply press the Test button - Et voila! The Gallery is up and running.
Suppose 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"
]
}
}
- Persons
- Due to the lack of support of IPTC field "Person Shown" the field "Suplemental Categories" is used.