I created this gallery because all the other galleries seem too complicated.
- PHP 7.2+ with Gd
- Composer 2
- Grab a copy:
git clone git://github.com/tasuki/gallery.git
- Install dependencies:
composer install
- Set up with a web server:
- Document root to
public/
, redirect nonexistent files toindex.php
. - These directories need to be writable by the web server:
public/gallery/
var/
- Document root to
- Create
.env.local
to customize, otherwise inherits from.env
:- Set website title:
APP_TITLE="your gallery"
- Set license link:
LICENSE_LINK="https://example.com/license"
- Set license name:
LICENSE_NAME="Example License"
- Set website title:
- Upload your intended directory structure with picture files to
upload/
. - Visit
/admin/update
url (currently everyone can do that, but it's harmless). - Verify the gallery shows up as expected.
- Optionally, delete the original pics (which could take up a lot of space)
from
upload/
- if you want to delete the photos from the gallery, delete them frompublic/gallery/
.
Regenerate thumbnails larger and in webp:
for i in `fd --type file -I | grep -v "/__"`; do convert $i -resize 600x300 `echo $i | sed 's/\/\([^\/]*\)$/\/__\1/' | sed 's/\.[^.]*$/.webp/'`; done
After everything's working, remove the original thumbnails:
fd -I | grep "__.*\.jpg" | xargs rm