Lightroom: Fails to detect metadata conflicts with JPEGs

  • 1
  • Problem
  • Updated 7 years ago
  • (Edited)
LR often fails to detect metadata conflicts with changes made by external programs to JPEGs. To reproduce:

1. Disable the option Catalog Settings > Metadata > Automatically Write Changes Into XMP.

2. Import a JPEG taken fresh from a camera (e.g. the one attached).

3. In the Metadata pane, change the caption to "Hello". The Metadata Status is now Has Been Changed.

4. Outside of LR, use Exiftool to change the caption, e.g.

exiftool.exe IMG_2305.JPG -exif:imagedescription=World

5. Wait a minute, or do Library > Find Missing Photos to force LR to notice a change to the image's date-modified. Notice that the Metadata Status is still Has Been Changed (incorrect) -- it hasn't detected a conflict with a change by an external program.

6. Click on the down-arrow badge of the thumbnail, and LR asks to Save The Changes To Disk? If you click Save, the caption set with Exiftool will be overwritten.

Now repeat these steps, but with step 2a inserted:

2a. Select the image and do Metadata > Save Metadata To File.

After step 5, the Metadata Status is Conflict Detected (correct).

I believe the root of the problem is that LR maintains an in-catalog per-image field MetadataDate, which stores the value of the field XMP:MetadataDate, representing the last time the metadata of the image changed. To detect a conflict with changes made externally, LR compares the file's date-modified with the catalog value of MetadataDate, and if the date-modified is newer, LR re-reads the metadata from the file and compares it with what's in the catalog.

But when an image without XMP:MetadataDate (e.g. a JPEG from a camera) is first imported, the catalog field MetadataDate is null, so LR never detects an external change. One fix would be to store in the catalog the field MetadataReadTime, the time that LR last read the metadata from the file, and to compare the file's date-modified with MetadataReadTime.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3724 Posts
  • 974 Reply Likes

Posted 7 years ago

  • 1
Photo of John R. Ellis

John R. Ellis, Champion

  • 3724 Posts
  • 974 Reply Likes
Appears to have been fixed in LR 4 beta.