Lightroom Keywords not exporting to JPEG
Alamy is one of the sites I upload to, and I’ve been bemused for a time when I’m adding some main keywords that major keywords seem to be missing. My recent trip to Kauai brought this home as the keyword “kauai” was missing on the uploaded files. At first I thought I had forgotten to add it, but it was there in Lightroom, as “Kauai”. At first, I thought this was the reason, but no, there is a deeper reason. This post has developed into two distinct activities as my understanding deepened. The first is how you change a keyword, say from capitalized to lower case, and the second is how you identify a deeper issue if your keywords are not showing up in the exported files. The bottom line for me (and I hope not for you) is that most of my online stock files have some missing keywords – all my Kauai shots and, even worse, I noticed that the keyword “washington” was similarly missing, and I have a lot of pictures of Washington DC! So, how to fix the problem? I haven’t come up with a way to add a new keyword to all my online files on all the stock agencies so I’ll have to check a few of them manually, but I wanted a way to stop the problem from occurring in the first place. Here is the low down on Lightroom’s treatment of keywords:
The first thing to know is that Lightroom can only hold one copy of a keyword in its database however it is capitalized. So if you have entered Kauai in the past, then all different capitalizations of that word revert to the one stored. So if I type the word in lower case, it makes no difference – it gets added to the database and file in the way it was originally entered, as “Kauai”
So, you need a way to rename all your capitalized keywords to remove the capital letter and stop the problem from re-occuring. Open Lightroom and in the Keyword List type in the word you are trying to retype – in this case Moon.
Right-click on the incorrect keyword in the list and choose “Edit Keyword Tag” in the list of options. This opens up a new window and you can change the word “Moon” to “Moontag”. This new word needs to be unique and not one that exists in the database. Click Edit. All files with “Moon” as a keyword are now renamed in the database with “Moontag”.
Now right click this new keyword tag and repeat the process, but this time renaming the file to “Moon”. To add my latest understanding of the problem, this page is also where you check each of the boxes in the pop-up screen to enable export of that particular keyword. This is an example of a keyword that is going to be exported to your JPEG – if these check boxes are blank, you need to check them to make sure the appropriate keywords are exported.
When you have finished, all files with the old keyword will now have the new one – in the database.
Now, on to the deeper issue. I found that many of the early keywords I added (probably in Lightroom 1.0) were not set to export in the screens that we looked at above. But I had no way of finding which keywords were set like that. My manual experiments convinced me that it was my earliest keywords that were at fault, which makes the problem even worse, because those early keywords are likely to be the common ones – in my case like flower, plant, tree, cloud, virginia – you get the picture!! After more research, I found that there was a bug in the updating process from Lightroom 1 to Lightroom 2 that caused all keywords to be set to “Do not export.” Adobe issued a script to fix the issue at the time (which I obviously missed), but now that we are at LR3, I don’t think I trust the script to work.
I found two ways to find the keywords in LR that have this setting – the first is the easiest one, the second has a lot more capabilities and could be used to automatically change the settings in the database if you are good with SQL!
The first approach is to export all your keywords from LR into a text file. Go to Metadata>Export Keywords and create a text file of your keywords on the Desktop. Open this in Notepad. As you scan down through the list of keywords, you will see ones that are in square brackets:
binoculars
biological
biometrics
birch
[Bird]
birdfeed
birdfeeder
bird-feeder
This keyword [Bird] is one that is set to “Do Not Export.” If you have Lightroom open at the same time, you can search for this keyword in the Keyword List and manually check the boxes to make it export as explained above. Continue to the end of the text file, and you will have found them all. I found about 100 keywords in this state, which was not too bad to do manually.
The second method is more interesting, and has the capability to write a script to automatically update the fields – although there is a chance that you may screw up the system if you change something that is linked elsewhere in the database! Lightroom uses an SQLite database, and so I needed a SQLite Reader. I found an easy to use open source SQLite editor at Softpedia Download this from one of the Mirror file locations shown (I’m reasonably sure this is a reliable site, but proceed at your own risk!). The download is a zip file so unzip the program to your desktop. It runs directly when opened, so there is no need to install.
Then locate your Lightroom database. This is in the location specified in Edit:Catalog Settings:General and has the extension .lrcat. Next, make a copy of this by copying to your desktop. We are going to look at this copy. You need to close Lightroom to copy it, and when you have, open Lightroom again.
Double-click on SQLite Database Browser icon and it will open
In File Open, look for the Lightroom database on the desktop. Open it, and you will see a screen like this:
Click on the second tab to browse the contents of the database. You need to select the table we are interested in. In the top row, click in the “Table” box in the top left of the tab and select “AgLibraryKeyword.” This is the table that contains keyword attributes. The screen will now look like this:
The column we are interested in is the one called “Include on Export” and any keywords where this is “0” will NOT be exported. In my case, these were all at the start of the table, which coincides with my assumption that these were early keywords, but you can also search for them by clicking the magnifying glass in the top left to open the search box. Select the field called “IncludeOnExport” and set Value to 0 – this will show you all the rows where this field is set to zero. I had 98 keywords set not to export.
One last quirk – if you have JPEGs in your database, the keywords in the file have not been changed, so you need to find those images, select them all, and do a “Save Metadata to File” to update the information in the JPEG itself. I didn’t bother to do this and all my files are already on the various websites and so there is no need to change the files on my computer – I simply wanted a way to stop this problem from occurring again.
So the learning lesson – this “keywords not exporting” problem impacts people who started with Lightroom 1.0 and upgraded through the various releases. The initial keywords were set to “Not Export” during the upgrade path between LR1 and LR2. The unfortunate result for me are a lot of online stock photos that don’t have the most obvious keywords included…
“Lightroom can only hold one copy of a keyword in its database however it is capitalized” is true for the keyword list shown in your examples but is not true in a more generalized hierarchical LR keyword list. For example you can include “Paris” as a city under “France” and also as another city under “Texas” which is also under “USA”. At the same time you could have “Bologna” as a city under Italy and “bologna” as a food product. However, if you have a flat keyword list, “Paris” and “Bologna” could only occur once as you stated. When you add “Paris” to a file, LR is supposed to ask you which one you mean – much like using the iStock CV. I saw that in an article somewhere but I’ve never actually tested it myself.
I also wonder why you needed to edit the keyword twice, first changing the spelling, then changing the switch setting and correcting the spelling. My testing shows you could have done both in one step in your example. [Note that fixing an incorrectly spelled keyword is not so simple if the correctly spelled keyword is already in the keyword list].
It’s interesting to look at the LRCAT in an SQL browser but I don’t recommend using that method to alter the database. When you manually change something, there may be other things that need to change as well that LR automatically takes care of but you know nothing about. I was a computer programmer for 30 years and I wouldn’t think of doing such a thing knowing what goes into the design of a complex database like the LRCAT.
Les, thanks for all your help on the Microstock forum,and thanks for your comments above. I agree wholeheartedly about not changing things directly in the LRCAT database – hence my use of it as a way to find the incorrectly set keywords. As it turns out, the idea you came up with to export the keyword list and look for [ brackets] is an even simpler solution. I left both there in case someone wanted to go through the database route if they have hundreds of keywords to edit, but that is at their risk. At least backing up the database allows you to try the result, but I agree it would be difficult to find all implications of a change. The reason I changed the keyword in two steps was that I thought my experiment showed that just making it lower case didn’t result in a any change, but I only tried it once. As it turned out, this was not the problem anyway!
Thanks for the clarification about the hierarchy. I did find a couple of those and they were capable of supporting different formats.
Steve
Very interesting post. That has happened to me too, when importing into Lightroom 4!
At least, I realized when I had only exported 50 images into my new library…
However, I am having another extra problem (bug), which I cannot happen to identify: I am able to manually edit part of the keywords, but not many others?
That is, a big part of my keywords in the list (amongst which some of them are not activated) seem not to react when I mouse over them or right click on them. I cannot aither select them to be added to the photograph I have selected, or anything at all. They are recognised by the system though, since when I start typing one of them on the box LR adds the rest.
Have you experienced this problem? that is even more bothering, because I cannot even activate again those keywords which became de-activated and which nestle now in the “frozen” part of the keyword list!
geez. This LR is killing me…
Thanks for writing about this issue, and let me know if you have a clue about my problem!
Kind regards from sunny Switzerland,
rafael rojas
Thanks! I have just migrated to LR4, but I haven’t seen the problem you are describing. I hope I don’t have another set of issues of missing keywords!
I don’t work in the same way you describe when keywording images – I always start from a system outside LR (either one of the keywording sites where you select similar images, or, more recently, the keywording site “KeywordSmart”, and then copy and paste the new keywords into LR. Sounds like you are selecting from keywords already in the system.
I hope there will be a point release soon to fix these bugs as I really like the way LR4 processes Raw files.
Steve
Thanks Steve for that info about keywordsmart…
In fact, on Lightroom I have realized now I cannot even see all the keywords listed on the right column? So for sure there is a problem with this…
Thanks for your help Steve!
rafael