How to Add a Label with Metadata to an Image

And Why You Should Do So!

By Tanya Riseman

June 2022

Introduction

I am archiving a mountain of family photos, digitally photographing/scanning the hardcopy prints, and then labeling people and places in the file’s metadata. Keywords are great for searches within Lightroom, Bridge, and other software. Titles are nice for briefly indicating the occasion. The caption is a great place for including who is in the photo in which order, as well as other details. A generalized label might consist of the title, caption, keywords, and filename. Digitized images are certainly less bulky than the originals and easier to share than one-of-kind hardcopy photos.

In this fairly technical article, I explore different ways to automatically place selected metadata below an image. But the purpose is far from nerdy. Many people like my relatives are minimalists. They don’t want to use, learn, or pay extra for sophisticated software like Lightroom to look at their photos and labels. They don’t know what metadata is. But they would be happy to look at some of it if it’s in front of their noses. This is why I like the label below the photo. Bonus, you can flip through the images quickly. You can always crop out the text and margins before printing.

Here is an example of what I want:

Figure 1 Image with metadata label by processing picture with the LR/Mogrify2 Lightroom plug-in

This has the following characteristics that I desire:

  1. The original photo (1446 X 1607 pixels). This particular image is in the public domain; found in https://commons.wikimedia.org/wiki/File:The_Beatles_i_H%C3%B6torgscity_1963.jpg
  2. A white border with extra space at the bottom
  3. A generalized label made up of the following metadata from the original photo, perhaps added or edited in Lightroom or other software:
    • title
    • caption (may be identical to “description” metadata)
    • the keywords/tags (a.k.a. “subject” metadata)
    • The originating filename (from within Lightroom) and the output file name
    • You could substitute whatever other metadata you wish, such as shooting parameters. Here is a list of all the possible metadata: https://exiftool.org/TagNames/EXIF.html
  4. The final image with label is larger (1526 × 1840) than the original photo. But with the bonus that if you crop down to the photo, the dimensions are the same as the original photo.
  5. The final image’s metadata has been automatically copied over from the original photo, i.e., the title, caption, keywords, camera/shooting information, etc. No cut and paste.
  6. Batch processing of images by folder.
  7. You can print a physical copy with a label in the extended margin instead of handwriting the information on the back of the print.
  8. Where it falls short: the method (soon to be revealed as the LR/Mogrify2 Lightroom plug-in) does not do line wrap-around, which is why the second and third lines are cut off.

Which will last longer — digital or paper?

Digitized images or hardcopy? Hum. Depends on how pessimistic you are. Keeping both is hedging your bets.

What file formats will be supported for how long? I think that current proprietary raw camera formats will eventually no longer be supported in the future. General proprietary formats like DNG are not that supported now. Even though limited by using lossy compression, JPEG is pretty universal now. As new file formats come along, they will allow “upgrading”. JPEG is also space-efficient.  My bet is on JPEG for now.

Software is transient. Which will survive for how long? I think there will always be some kind of simple viewers like finder and Preview (on the Mac) for widespread formats like JPEG.

Why include chatty metadata?

Rather obviously, it helps to document the image and allow searches. The Library of Congress makes a great case for it: https://blogs.loc.gov/thesignal/2011/10/mission-possible-an-easy-way-to-add-descriptions-to-digital-photos/

Figure 2 How to enter title and label (and keywords) metadata using Lightroom

What Options are Available, with PROS and CONS

I didn’t find much in the way of options.

  1. Lightroom’s Print module almost does it. CON: Lightroom’s “Print > Print Job to JPEG” is lacking particularly as all metadata is stripped out in the output file. PRO: Will print to JPEG the contents of a whole file folder at a time, which is efficient. PRO: Can copy out metadata to the label. PRO: You can also use “Print” as intended to make a physical print with a label in the extended margin. CON: if you print to JPEG a whole folder, you get all output files with the same name (the first) and a sequence number.
  2. Photoshop PRO: Photoshop can do scripting and “droplets” as well as plug-ins. Photoshop can view metadata. Can do batch editing. CON: It is beyond me at this point to implement labeled images. PRO: You could make it look really pretty. PRO: It can be done, I think. Some people on the internet show examples, but don’t share scripts that are often very old anyway. If you know how to make labels in Photoshop, please submit an article or letter to the editor of our Cable Release newsletter at cablereleaseeditor@ssccphotography.org or contact me at https://tanya-riseman.squarespace.com/contact .
  3. There are plenty of things that one can find on the web that superimpose the label on the photograph, but generally not below or not using metadata. I probably have not searched hard enough.
  4. sh shell scripting on Mac and Linux (and equivalent on Windows) using command line programs exiftool and ImageMagick. CON: Oh, the horrors of it— need to be a computer scientist to do this. (There is a GUI version of exiftool to look at and write metadata that sounds friendlier but that’s only half of the job.) PRO: It is capable of producing basically the same labeled image shown of the Beatles as LR/Mogrify2 (Figure 1), with the added benefit of line wrap-around.  PRO: It automatically adjusts the bottom margin for the length of the label text.
  5. LR/Mogrify2 is a Lightroom plug-in for Lightroom’s “Export” module. It made the labeled image of the Beatles in Figure 1. PRO: It hits almost all the desired features. PRO: You can make an LR Export preset. CON: It does not do line wrap-around, which is why the caption/description and keywords are cut off.  (I have put in a feature request because it is a simple fix, but the plug-in hasn’t been updated since 2019 so I’m not optimistic.) CON: You have to manually adjust the size of the lower margin to fit your label text. This plug-in is recommended by Adobe: https://helpx.adobe.com/lightroom-classic/plug-ins.html despite these problems.

Instructions for How to Make Labeled Images Efficiently

Option 1: The “Print > Print job jpg” Option in Lightroom (no metadata transferred)

See this screenshot for how to do it:

Figure 3 Create an image with metadata label using Lightroom’s Print module. No metadata is stored in the resulting file :-(.

It is not that pretty but it is functional, other than the lack of metadata in the final file. Also, you have to do one file at a time alone in the LR folder to get the name as expected. That is unfortunate. Note: to get approximately the same resolution for the picture part, you have to fiddle with the DPI of the output image.

Option 2: Photoshop

Beyond me.

Option 5: Install LR/Mogrify2 and get result in Figure 1

For basic installation instructions see:

https://www.photographers-toolbox.com/products/lrmogrify2.php?sec=install (See also https://www.photographers-toolbox.com/products/lrmogrify2.php?sec=quickguide for how to use.)

Installation of LR/Mogrify2 can be a bear on the Mac. Since this product is not purchased from the Apple App store, you need to do additional installation steps. Read here for detailed instructions. I have not tried this plug-in on Windows, so maybe the installation is straightforward.

Now for how to use LR/Mogrify2

For a hand holding illustration of the use of LR/Mogrify2 (to make an Instagram look) including how to make a preset see: https://stuarttevendale.com/2022/02/10/how-to-add-white-background-for-instagram-in-lightroom/

To make the labeled image shown in Figure 1, I used the following values, as shown below in three screenshots:

Figure 4 Lightroom Export using LR/Mogrify2 plugin, top of dialog
Figure 5 Lightroom Export using LR/Mogrify2 plugin, middle of dialog
Figure 6 Lightroom Export using LR/Mogrify2 plugin, bottom of dialog. Results in Figure 1.

Option 4: Use shell script in a terminal that calls exiftool and ImageMagick

The following shell script has two advantages over the LR/Mogrify2 plugin

  1. It does text wrap-around for long lines.
  2. It automatically adjusts the bottom margin to accommodate the length of the label.

Installation and use of shell script: Read Here .Thanks to my computer scientist for providing the initial script.

Note: the shell script might fail if there is any white space in your file names.

Resulting image:

Figure 7 Image with metadata label created by processing picture with tag_cap_images.sh terminal script.

How many iterations of JPEG does each method take?

 LR Print JobLR/Morgrify2Shell script
scanner or cameraJPEG (or TIFF)JPEG (or TIFF)JPEG (or TIFF)
Export from LightroomJPEGJPEG (or TIFF but huge)JPEG (or TIFF but huge)
Process outside of Lightroom  JPEG (or TIFF but huger)
Max # of JPEG Implementations223

In Lightroom, we may want to do some basic editing like cropping, white balance, contrast, etc., of imported files, in addition to adding the metadata data title, caption, keywords, and capture date (the approximate date of the original photo, not the scanned date).  

If using a high scan resolution of 300 or 600 dpi and a JPEG quality setting of 95%, JPEG degradation should be really negligible with two or three iterations. Save the scanned original file, particularly if you want to go back and re-edit.

Finally

It is a bit of a tie as to which method is best. The most information is placed in the label by the shell script because it has wrap-around. It however uses one more JPEG step than LRMorgrify2 so it loses some quality. Consequently, you have an intermediate JPEG file that you will need to delete.

If your captions are short and don’t need wrap-around, then LRMorgrify2 is a good choice and conveniently in Lightroom’s Export module.

If you know a process to make labeled images the same, better, easier, or prettier in Photoshop or other software, please submit an article or letter to the editor of our Cable Release newsletter at cablereleaseeditor@ssccphotography.org or contact me at https://tanya-riseman.squarespace.com/contact .