by ʇolɐǝz ǝɥʇ qoq

Submit your Photo
Hall of Fame

Please participate in Meta
and help us grow.

Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a weird situation in on my hands and hope to find some direction/hints...

The ultimate goal is to have a Lightroom catalog with about 30 000 keyworded images in it.

The images are all JPEG, inside a single folder, each with unique numerical name, like 123456789.jpg.

The keywords are inside a mysql database and I can dump them and/or process the list in whatever format needed (for example tab/space separated "filename"-"keywords" value).

I know I can import keywords from text files in LR, but that won't match them to the images, AFAIK. So I presume I have to first run some kind of EXIF batch to match filename to keyword set and insert the keywords in JPEG files. After that I hope LR will recognize the EXIF during import (I've tested that and it seems to work).

So that's about it. Any help appreciated!

PS: The two topics I found helpful in the final resolution of the problem:

share|improve this question
up vote 0 down vote accepted

You could export the tags as a batch script that runs exiftool to add the keywords to the JPEG files:

exiftool -keywords+=banana 111.jpg
exiftool -keywords+=fruit 111.jpg
exiftool -keywords+=tree 112.jpg

with a query resembling this:

select concat('exiftool -keywords+=',KEYWORD,' ',FILE_NUMBER,'.jpg') from IMAGE

and then

  • backup your images
  • run the generated batch script
  • import the images into Lightroom
share|improve this answer
Thanks for the exiftool pointer! Extremely useful tool, as it seems! What I did was similar: - mysqldump -T with --fields-terminated-by=, - exiftool -csv="name of csv file" *.jpg - import into LR The test with 10 images was successful, now it's time to run the whole 30 000 :) – Boby Dimitrov Oct 10 '11 at 13:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.