My first Piwigo plugin

closeHey, just so you know ... this post is now about 3 years and 2 months old. Please keep that in mind as it very well may contain broken links and/or outdated information.

I switched from Gallery to Piwigo back in 2015 for my photos website software. Since then, one thing that has always bugged me is how Piwigo handles “physical” albums. The “normal” Piwigo user just uploads photos through the web interface, which puts all of the photos into a “/upload/year/month/day/randomfilename.jpg” folder structure. You can then link the photos into one or many “virtual” albums. While this is a pretty flexible approach, I prefer to use a physical album structure: where the albums in my Piwigo site match the physical folder layout on disk.

The problem with using physical albums, however, is that I tend to occasionally re-organize and move a photo or video to a different folder. For example, maybe I had a single photo of the Statue of Liberty which I dumped into my “New York” album, but then I had a few more photos so I decided to create a “Statue of Liberty” sub-album under “New York” and move the exiting photo there. With Piwigo’s synchronization process the file’s original location is deleted from the database and re-added in the new folder location which means all of the metadata associated with the item (tags, description, etc.) are lost and need to be re-entered.

For the past two years I’ve been dealing with this manually: make a note of the description and tags of the photo, physically move the file, run Piwigo’s sync process, and then edit the file and add back the description and tags. Finally, I decided to write a plugin to do this automatically. PPM (Physical Photo Move) is an attempt to alleviate this inconvenience by allowing an existing item in a physical folder to be moved to another folder and keep all the existing metadata.

I just published the first release to Piwigo’s plugins repository tonight and my source code is here on Github. Check it out and let me know what you think!

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *