How I wrestle keywords from Lightroom Classic into PhotoLab... sort of

I’ve discussed my (some would say excessive) keywording practices in these forums a number of times and still today I come to the conclusion that Lightroom Classic (hereinafter just “Lightroom”) is the only tool that will meet my needs — given I use a Mac and don’t want to spend a significant sum just for this function. I worked out a process this week that others may find useful. But first, some background…

For a while, I thought Lightroom’s ability to write its keywords into my DNG files (or to XMP for other RAW types) was my freedom to then use PhotoLab to do everything else after keywording, including exporting the final, processed image. But I recently realised the flaw in my plan.

Lightroom has two features of keywords that I use in a significant way: synonyms and ‘do not export’. Synonyms are as simple as they sound, they are an additional keyword that has a one-for-one association with another one. For example, one might have a keyword, as I do, “Nuremberg” with a synonym “Nürnberg”. The first is the English name and the latter the German name for the city*. “Do not export” is also quite simple but some might wonder why have a keyword that doesn’t get exported? The reason I have is hierarchies. To keep all my place names in one easy-to-access structure, I have a top level keyword “!places”. While this makes it easy to get to my place names, this keyword itself is not desirable to have in my final exported images.

The trouble is neither synonyms nor ‘do not export’ are stored in the original files. So when I type “Nuremberg” as a keyword on a photo, this is what gets written to the original file:
!places, Europe, Germany, Nuremberg

But if I export from Lightroom, this is what gets output:
Europe, Germany, Nuremberg, Nürnberg

For this reason I had recently taken to doing a round trip from Lightroom (keywords added) to PhotoLab (processing applied) and back to Lightroom as a linear DNG with everything baked in. Then the final downsized export would happen from Lightroom. The downside to this approach is the giant linear DNG files. While my 24 megapixel original DNGs weigh in around 30MB per image, one recently processed image topped out at 84MB! So I looked for a different approach.

My first thought was to copy the keywords out of the DNG file into the PhotoLab-produced JPEG, but I quickly realised that had the same problem. The only way to get the proper keywords was an actual export from Lightroom. And that’s when the solution came to me. Here’s the process:

  • The images are imported from the SD card into Lightroom which automatically creates my YYYY/MM folders to store them in.
  • I add all my keywords using Lightroom’s fantastic capabilities.
  • I write the keywords back to the files (this is not critical to this process, but I mention it for completeness).
  • I pick which files I will process using Lightroom’s “pick” system.
  • I select all the picked files and send them to PhotoLab via DxO’s plugin. This does not do anything to any files, it just tells PhotoLab which original DNGs to include in a new Project.
  • In PhotoLab I apply all my processing.
  • In PhotoLab I export all my processed photos using my usual preset. This will turn the original KP211234.dng into KP211234.jpg in a standard directory, properly sized for uploading to Flickr, but with the incorrect keywords.
  • I return to Lightroom and with the same bunch of picked photos selected, I export them using a new preset I created called “Keyword proxies”. This preset writes out a very small JPEG image with an automatic suffix of _proxy into the same folder PhotoLab used. So it will produce KP211234_proxy.jpg. This has the correct keywords in it but none of my PhotoLab processing.
  • My automation software Hazel is watching the folder for files ending in _proxy that are JPEGs and runs a few commands:
    1. Derive from the name KP211234_proxy.jpg what the ‘real’ filename is – KP211234.jpg
    2. Run an ExifTool command to copy the keywords from KP211234_proxy.jpg to KP211234.jpg
    3. Delete the proxy file

The ExifTool command is pretty simple, as follows:
exiftool -overwrite_original -TagsFromFile “$fromfile” -Subject -HierarchicalSubject “$toFile”

So now I only have one extra action to perform — the proxy export from Lightroom — and I get all the keyword goodness of Lightroom applied to all the processing goodness of PhotoLab and no extra files lying around.

If anyone has any questions on any of the technical details, just ask.

*I spent less than two days in Nürnberg, arriving on 31st December 1986 and leaving on 1st January 1987, but it was a memorable visit for lots of good reasons.