The last time I stopped working on the new photo gallery scripts was because the difficulty of importing my old gallery. There are over 30,000 pictures from 3,000+ different dates and grouped into 100+ galleries. There are a few problems. My original gallery script worked with a mixture of thumbnail sizes. In the beginning I had a mixture of mainly two aspect ratios: 4:3 for my older images and 3:2 for my DSLR photography. My older images were captured for standard screen sizes (320x240, 640x480, 1024x768, ext). When I did thumbnails and available download sizes, I would use this 4:3 scale. For my DSLR photography I started using the base size of 300x300, meaning the image could not exceed 300 pixels in width or height. This typically meant thumbnails of 300x200 for landscape and 200x300 for portrait oriented shots. I started with the bounding pixels sizes of 75, 150, 300, 600 for thumbnail sizes, latter adding 900, 1800 and then 3600 and full size.
The way the thumbnails are stored is by the bounding size limits. For example, 300x300 for images where the maximum width or height must be 300 or below. The older images were often landscape only, so I also had directories like 320x240. To represent full-size images I used 9999x9999. Sometimes there would be mixes, like: 75x75, 150x150, 320x240, 640x480.
The photo gallery was written about a year after I started shooting DSLR and I didn't yet have many pictures. Thus the work to incorporate those older images not in 4:3. Now some 17 years latter, 4:3 is the overwhelming majority of my pictures. There is no reason to keep a mix of aspect ratios since we have the full-size version. A 320x240 picture can still have a 300x300 limited thumbnail, and space is no longer a concern. The new gallery will keep a smaller set of thumbnails and be able to resize the full-size image dynamically if desired.
The main problem is tracking down all the full-size versions of pictures. The first complication is that when I first started doing digital photography, I typically would save in the PaintShop Pro format (PSP). Nothing but PaintShop Pro can read this format. By 2005 I stopped using PSP and switched to saving in lossless JPEG, or if I used layers, I would save in both formats. At some point more recently I wrote a script to convert all the PSP images to lossless JPEG, so I do have a common format for all the images.
Another problem is that I didn't start including full-size images until around 2011. This isn't too much an issues since most of the images come from my photography directory and there is a 1:1 correlation between the web directory and the source. However, that isn't always the case. Sometimes I have cellphone camera pictures, or pictures taken from friend's cameras.
To solve this problem, I started by exporting the entire database of images to a JSON file. Then I could parse this file and find sources for each of the images. If a source wasn't found, I could list the problem image and address it. There were several dozen, but it wasn't actually that bad. In my first round, I just had to create links to full-size version for the old aspect ratio images. There were also missing images. Many of these were renames or images that ended up in the gallery by accident. It took a bit of sorting to straighten that all out, but I now have an image gallery that has a 1:1 translation to full-size source images. That means I can use this information to index the new gallery.
The new image gallery is very much vaporware at this point, but I keep edging closer to making it a real thing.