Yes, but the Ajax is missing for reloading the content. You can not pass an array or object with all the photos on the first call. that's too much data, too much traffic at once. Ajax is needed. And then by JSON. JSON generated by PHP, on the fly. I have never done some thing like this before.
You have to keep track of what Google plans. So send very little data on the first call, an absolute lightweight page. When the viewer is first on the page, it can be loaded endlessly. See, for example, the OSM map button load, which I made myself. OSM Map and all related, as ol.css and ol.js reload on viewer request, button click. You can also load content with active view (by scroll). That's all possible.
The future of photo hosting is no longer a digital conventional cardboard photo albums for a very long time. I call it stamp collection. In german: "Briefmarkensammlung". That's out of date. Unfortunately, I have such a "stamp collection", which unfortunately eats a lot of time.
.oO(it's needed a ZenStream, like flickr for selfhosting)