I use this...
function gallery() { $dirname = "img/"; $images = glob($dirname . "*.{jpg,JPG,jpeg,JPEG,png,PNG}", GLOB_BRACE);
foreach ($images as $image) { echo $image; }
}
With https://bulma.io, http://simplelightbox.com and http://ftpbox.org. I'm sure there's a sync thing for mobiles out there.
I should package it all up somehow and whack it on Github really.