There are several settings and commands related to writing metadata to images in digiKam:
“Write Metadata to Files” in the Album menu
“Write Metadata to File” in the Item menu
“Write this Information to the Metadata” in the Settings > Configure digiKam > Metadata > Behaviour window
“Use lazy synchronization” also in the Settings > Configure digiKam > Metadata > Behaviour window
But for some reason I can not configure what I want and what seems logical to me. As I often modify tags for 1000’s of photos at once, I want digiKam to store metadata edits in the database, not write them to the files, but write to selected files on my request.
If I select “Write this Information to the Metadata” in the settings, then any modifications are immediately written to the files. If I unselect that option, make modifications, and then use “Write Metadata to File” from the menu, nothing is written to the files.
I haven’t tried lazy synchronization, but according to the manual this writes all changes to the files when you close digiKam. That’s not what I want either.
Is my workflow really not supported, or am I not understanding how digiKam works?
With what you propose, you guarantee inconsistencies between the database and the image files.
Some files/sidecars will have your changes incorporated, some won’t, while for all images the database will have your changes. That means that you cannot know if the image metadata are current or not, unless you check against the database every time…
If you never write metadata to image files, you know what state each file is in.
Afaik, digikam always updates files (if possible, raw formats are tricky). That avoids the confusion possible in the first case. And it means that what you want isn’t possible…
There’s one wrinkle here: digikam will by default not write to raw files. So there you have to use sidecar files to store metadata outside the database. And you can also select to write to sidecars only. But that will still be done for all changes to all files, to maintain consistency.
As you probably gathered, I’m not a fan of writing metadata changes only to some of the files in the collection… Having different information in two places which should have the same information can be confusing (to say the least).
Note that for exported images (i.e. new files created) the issue isn’t relevant, as you have to write metadata anyway. So there you just write the requested database items in addition to any needed items. Or you write the minimum possible, or you write a selection. As those images are not (yet) in the database, there’s no issue with differences between file contents and database contents.
Thanks for the reply! We may have different ways of looking at things, could you explain why you see inconsistency as a problem?
There is no problem with inconsistency, as long as the user has the possibility to update the image files (write the metadata) on demand.
I guess my problem is that I don’t understand the function of the “Write Metadata to File” entry in the Item menu, because either:
“Write this information to the metadata” options (Metadata settings) are not checked – in this case “Write Metadata to File” does not do anything.
“Write this information to the metadata” options are checked – in this case “Write Metadata to File” has no use because the metadata already gets automatically written.
I think what you are looking for is in the Maintenance menu. You can configure digiKam to not write metadata back to the file in general, but using the metadata write tool to can “force” digiKam to write the metadata.
The last option in the Maintenance tools is to read/write metadata. You can choose to write the metadata back to the image or sidecar. You can filter which images you want to write to at the top by selecting specific albums or tags.
On a related topic, I suggest never writting to the image, always writting to the .xmp sidecar, even when the image format supports embedded metadata. I’ve more than a few .jpg files corrupted by bad metadata writes.