Immich is a self-hosted web gallery/image organization service, designed to be a Google Photos Replacement. Since I am a sucker for integrating things, and that it comes with an API, I have been tempting for a while to try it.
Especially as part of my AI@home: Classifying images with Ollama series, I have been looking for a way to integrate that system more into my image organizer itself. But more on that later, this is about immich and my migration journey.
I am not going to describe immich in itself too much, but I am quite happy with it in general. When it comes to image touch up and stuff, it does lack a bit compared to my previous solution, digikam – but the fact that it has a good API means it’s possible to create solutions on the outside of immich that just interacts with it, so I decided to accept that limitation, and migrate.
My previous library was a digikam-library, which in essense is just a file hierarchy where the albums is defined by the file hierarchy. I didn’t have to deep an hierarchy, though, it was mostly events/trips that was the albums, under one catalog per year only.
You can run immich directly on this library and manage the files outside of immich, which I did for a while. But I did realize that this strategy came with limitations, the management features were more feature-rich in a native library format, so I decided to go all-in importing.
immich has a command line that can upload images, which does it’s job. immich-go is a more feature-rich tool, which I chose to use. With it, I could:
- Upload all images recursively
- Create folders based on the hierarchy, with a flexible naming scheme
- Keep all the metadata that was written in XMP sidecar files. Thus, a prerequisite was sure that all metadata was in sidecar files.
Once migrated, I installed the immich app on my Pixel phone, so that all new images would automatically end up in my library. I ended up with a moderately huge job of removing duplicates, as those that already was in the library risked being re-uploaded. Immich has some tools to avoid uploading the same image again, but if you have actually managed it locally etc, it’s not perfect. In retrospect, I’d probably recommend doing it the opposite direction: Get the camera pictures in first, then the local library. Cli tools are more feature-rich in regards to preview of what it will do, and it’s easier to i.e. create custom tags etc when you upload, so that you know which are just uploaded, and possibly duplicates.
Nevertheless, your life becomes much easier if your phone can just upload its images and know that there is a copy of all of the phone images in your library. I also leave it in the album the phone uploads to, as a picture can be in more than one album. If I’d had more than one phone where I took images, I’d likely have made them manage different albums.
Once all my pictures were in immich, with as much metadata as I could, it was time to let Immich machine learning tools to its job, most notably face recognition. Immich happily imported the faces from the XMP files in the digikam library, but here again, I found it makes my life much easier over time if I just have one source of people – the immich face database and recognition. It is actually based on insightface, the library I had been using for my media classifier tool already, so I knew it’s pretty decent. Having run face recognition on them, it didn’t actually have names on the faces. However, as most of them would already have a face label, I could at least use that as a visual cue. But all in all, getting names on the faces was a manual job I chose not to try automate, as there’s way too much failiure causes which might up with me having mislabeled persons.
All in all, it did take a few evenings work to get my library to a decent state, album- and metadatawise, but it was totally doable. And it laid the foundation for my next step in my image classifier journey: Integrating the media classifier with immich.