I’m migrating my older galleries from Flickr to my self-hosted static gallery site based on thumbsup. This is a slow process because I’m reconciling my local copies with Flickr; for some of the older albums I don’t have local copies. In those cases, I download the originals and rewrite the metadata.
I ran into one interesting problem. With my configuration thumbsup usually generates three top-level containers:
- Tags
- Years
- Albums
Instead, it was generating four containers, with Tags repeated:
- Tags
- Years
- Albums
- Tags
This second “Tags” contained only seven images, all of which I’d downloaded from Flickr. The first “Tags”, meanwhile, was effectively overwritten by the second, so I couldn’t just leave it. After false starts, I got on the right track when I realized that Lyn, which I use for desktop gallery browsing, didn’t recognize my custom tags.
Metadata
There are a dizzying number of metadata formats and tags. The ExifTool documentation recognizes 17,676 unique tag names spread across 150 formats. The two most prominent for this use case are IPTC (which stands for International Press Telecommunications Council) and XMP (Extensible Metadata Platform). Each defines their own tag for keywords. XMP uses Subject
, while IPTC uses Keywords
. Both expect a comma-separated list of strings. Thumbsup supports both, plus keywords
, which Picasa used.
My PHP wrapper script invokes ExifTool and uses the -keywords
argument. I briefly thought this meant I was using the Picasa tag. In fact, the -keywords
argument in ExifTool will populate the correct tag(s) based on the existing metadata in the file.[1] For my images this means the IPTC tag, so examining them reveals that Keywords
is set.
The problem is that the files I downloaded from Flickr had an empty Subject
tag, which conflicted with the custom value I was writing to keywords
. My immediate fix was to remove Subject
from the files:
1 |
|
That did resolve the immediate issue, by removing the erroneous second “Tags”.
See this forum post and related documentation for more information. ↩︎