Captioning Old Family Photos

Like many people researching their family tree I’ve accumulated a large pile of old photos. About ten years ago I scanned them all to preserve them and also to share with the rest of the family. However, even though digitization is good for long term preservation, it tends to disconnect the photos from their original context.

Photos often have annotations on the back, such as a date or a place, and these aren’t easy to capture. I was careful to scan both sides of any image where I saw something worth preserving but as a separate image it’s easy for it to become disconnected from its pair.

Photos are also often arranged alongside similar or related ones in an album which can provide important context.

Then, there is the matter of identifying the people and places in the image. Often the original owner can name the people and this can be written down for preservation. But once again it’s easy for this information to become detached from the image.

One simple technique is to rename a scanned image with some basic information. For example, the image below was renamed to 1933 - Dinah Flo (with Tizzi's baby) Uncle Jimmy at Whitley Bay.jpg after scanning:

A photograph taken in 1933 of a family at the beach

That has worked well for me even though it doesn’t capture all the information I know about the photo. The filename preserves well over the medium term, or at least it did until the advent of widespread cloud storage for images, which tend to hide or lose the file name completely.

It’s also not very helpful to people who one day may be trying to make sense of my collected genealogy files. I know that “Dinah Flo” refers to two different people “Dinah” and her daughter “Flo” because of my own context, that Flo was my grandmother!

Embedding Metadata

Several years ago I started on a project to embed descriptions of each scanned photo inside the image itself. The technology that does this is called EXIF and it’s a general purpose format for capturing metadata about images. The main advantages are that much more descriptive text can be added and that the embedded EXIF remains with the image even if it is renamed.

I used an application called Photini to add titles and descriptions to my image collection. A tool like exiftool can be used to extract any existing exif.

I added a Title, Description and Keywords for each photo, following some rules of thumb:

  • Titles should be short and include the main person’s name or family name and the year the photo was taken
  • Descriptions should include the full names of each identified person with their year of birth, if known, the place and/or some information about the event
  • Years can be exact (1965) or estimated such as before (bef. 1965), after (aft. 1965), about (abt. 1965)
  • Keywords should include all surnames and placenames and anything else that seems useful

For the photograph above I added the following EXIF:

Title: Dinah Peak and family at the beach in 1933

Description: Dinah Peak (b. 1888) with her family at Whitley Bay in July 1933. At the back on the right, Florence Hall (b. 1912) holds Elizabeth Hall’s (b. 1910) son James (Jimmy) (b. 1932). The boy on the far right may be Dinah’s son James Hall (b. 1916). The seated woman is almost certainly Elizabeth Hall (b. 1910)

Keywords: peak, hall, northumberland, whitley bay

Cloud services such as Google Images can read this information and make it searchable. They can also display it, Google Images has an info button (the letter i in a circle) at the top of the page which shows extra information, including the title and description.

It’s a long, slow process, and I’ve done about half my collection so far. Sometimes I have to research the people in the photograph because I’ve forgotten the details. Sadly, all the people from my granmother’s generation are no longer with us so it’s not possible to ask them directly for more information. But I ask other family members where I can and try to piece together the scattered knowledge.

Photos have the incredible ability to jog people’s memories!


One of the nice things about scanning old family photos is that they can be easily shared with the rest of the family, who may not know much about the people in the picture. Even though the metadata is embedded in the image, it isn’t accessible to most people without extra software. The web versions of systems like Google Images can show the information if you know where to look, but it’s invisible most of the time. Furthermore, social media apps tend to optimize photos to remove identifying information or simply to reduce file sizes.

I thought it would be nice for the rest of my family to easily see the extra information I have added into the images so I thought I would try and embed the description as a caption to the image. This turned out to be quite possible but I wanted to automate it so I didn’t have to convert the entire archive of photos by hand. I turned to ImageMagick which is the Swiss Army Knife of batch image processing.

With some Googling and trial and error I came up with this incantation which places a black border around the photo and a caption beneath it:

convert "input.jpg" \
    -bordercolor Black -border 20 \
    -background Black \
    -fill '#cccccc' \
    -font Helvetica -pointsize 30 -density 90 \
    -gravity Center \
    caption:"The caption" \
    -gravity Center -append "output.jpg"

I wanted the text to be large and readable on small devices so I went for white on black text for contrast. This is what it looks like when the earlier image is captioned with its description.

The same photograph of a family at the beach but with a descriptive caption visible

I packaged this up into a bash script that applied it to all the files in my collection. I chose to name each file using the discovered title. The core of the script is below, in case you want to do something similar:

for F in $FILES
    if test -f "$F" 

        SIZE=`identify -ping -format '%[width]' "$F"`
        CAPTION=`exiftool -q -s3 -Description -if '$description' "$F" || exiftool -s3 -Title "$F" || "$NAME"`
        TITLE=`exiftool -s3 -Title "$F"`

        if [ -z "$TITLE" ]; then

        echo "Doing something to $F"
        echo "size=$SIZE"
        echo "caption=$CAPTION"
        echo "title=$TITLE"

        convert "$F" \
            -bordercolor Black -border 20 \
            -background Black \
            -fill '#cccccc' \
            -size "$SIZE"x \
            -font Helvetica -pointsize 30 -density 90 \
            -gravity Center \
            caption:"$CAPTION" \
            -gravity Center -append "$OUTDIR/$TITLE.jpg"



Other posts tagged as genealogy, technology

Earlier Posts