Sorry if this is just a little bit off-topic.
Have you looked at Single File Gallery (SFG)?? Single File PHP Gallery 4.11.0
A brilliant PHP script that handles the management and display (showslide) of photos in an
"auto-magically" way. It is so simple to set-up and use.
All you need to do is create a folder on your web-server (it needs to be able to interpret PHP files), then drop all the relevant photos into it. And then "hey-presto" everything is available before your very eyes.
Our Home Surveillance System project makes extensive use of SFG to manage the various capture folders (e.g. Recordings, Snapshots and Motion Detections). It's well worth a look!!!