I like taking photographs and post the better ones out in the open. In most cases, you can expose images on the web to search engines and they’ll be indexed. A search on Google or Bing will return them under the Images tab. I was interested in seeing how to get my indexed images to respond to the License segmentation.
Google explains how to add metadata using structured data outside the image as well as the necessary metadata inside the image file. Bing supports a variety of open data formats, including RDF, Schema, and Open Graph. The benefit of using structured data is that you don’t need to touch the images themselves. You can wrap the photo online with metadata in a web page which will give the search indexer flags to follow.
Piwigo and Metadata
I use the open source image gallery called Piwigo ever since Flickr put a cap on images for free accounts. Even as I was storing them on Flickr, I was noting that they were CC0 or public domain. Someone on Wikimedia Commons set up a harvesting function and grabbed many of them. That was fine with me. The more people can use them the better.
I was also on a web site called Morguefile and you can still my photos there. I don’t use it any longer because, after some user interface changes, I could no longer find my own photos or manage them.
Piwigo has become my main location for public image sharing. All of the featured images on my blog are ones I’ve taken myself. They will come from my Piwigo site.
Once you have the software installed and configured, Piwigo can display the image’s exchangeable image file (EXIF) format data. You can toggle access to EXIF data on and off. I keep it on because I like to look at other people’s EXIF data and feel like it’s a fair exchange. Under EXIF, you can learn the settings the person used for the camera – lens and other settings – in case you want to try to copy the image or approach. It’s one of the ways I’ve learned to take different types of photos.
But EXIF isn’t all there is. And one of the other open formats, IPTC, is what Google looks for. Frankly, I found the IPTC web site and explanations of its standard difficult to navigate, but I eventually found the User Guide that has a listing of the items. The key element that Google looks for is the Web Statement of Rights.
Easy enough. Now, how to add the metadata?
Open Graph Plugin
If you’ve ever seen a social media posting that incorporates an image and excerpt from a resource, you’ve probably seen an Open Graph equivalent. If you’ve ever wondered why some URLs pasted into social media expand and some don’t, it’s because of Open Graph support. In the tweet below, everything below the 240 characters is generated by Open Graph settings on my web site that tell Twitter what to grab and place where.
On WordPress, I use the JetPack plugin from Automattic. Once you enable sharing from within JetPack, the Open Graph metadata is added to your site. If you use any sort of a content management system, there are either plugins or simple ways to edit your templates to add Open Graph support.
In Piwigo, you can either use the manual route or the Open Graph plugin. Piwigo’s web site calls them extension but they’re called plugins if you log in to your Piwigo interface. Install the plugin, go to the configuration page and give your information (Twitter handle, etc.), and you’re done.
Easy enough. But it still wasn’t all I wanted. I had decided to touch the images themselves and place the metadata in the image files.
Open Source Metadata Editing
I left Flickr because I had more than 1,000 images and hit the free account ceiling. I knew I had a lot of images, then, to make this metadata change to. The first thing I had to do was to find an application that would edit images in batch. And I wanted it to be free, since I was really only going to do this once or, ongoing, in a few files at a time.
I started by doing web searches for batch image metadata editors. There are plenty out there and I tried a couple that had free trials. Nothing really grabbed me and, unfortunately, while they all supported editing the IPTC copyright field, none of them supported the Web Statement of Rights field.
While I was noodling on this issue, I added the Simple Copyright plugin to Piwigo. My main goal was still to trigger the search engines to index licensing information, in this case, Creative Commons Zero / Public Domain. Simple Copyright will add a footer to each page, where you can put global license information. Additionally, it’ll insert a license onto a photo page so that visitors can see how each image is licensed.
In the image below, you can see a Public Domain banner in the image metadata. There is a link that goes to the Creative Commons site for anyone who isn’t sure. At the very bottom is the site footer, that also includes a license reference.
This image was actually the one that inspired me to make my licensing clearer. I had a visitor to this image from Ketchikan, Alaska. Ketchikan is the home to the Fast Response Cutter Denman, which is the boat in the photo. It occurred to me that someone doing social media for the U.S. Coast Guard might have stumbled on the photos and I wanted to make sure they knew they could use them.
So far, so good for people who could see the image page, either with an eyeball or a screen reader. Now for the machines that are doing the indexing and may only be looking at the images themselves.
I eventually landed on Digikam, an open source photo manager. I have used it occasionally in the past but did not have a current copy installed. I don’t do a lot of photo management and it was not a regular part of my toolkit. But you can set Digikam to look at folders of images and add images to a batch queue. This was how I was going to fix all of my images.
I used FTP and the also-open source Filezilla client to download all of my photos, about 6 GB. I then started to dig around in Digikam since I knew it could do what I wanted, I just didn’t know how. As you can see in the screenshot of the Digikam interface below – showing the same U.S. Coast Guard cutter image from my web site – it exposes a lot of EXIF and IPTC data that you wouldn’t normally otherwise see.
You can apply batch effects by clicking on Digikam’s toolbar where it says Batch Queue Manager. This will open the manager’s window. You can leave it open and continue to add images to the manager. The top left quadrant will list the images in the queue. The bottom left allows you to configure some of the output settings: do you want to overwrite images or make a duplicate with a new name? do you want to keep or change the image quality?
The bottom right is where you can select the apply metadata template option under the Base Tools tab. But when you click this, it will change the top right quadrant and list your metadata templates. If you have not already created one, you’ll need to exit the Batch Queue Manager and create a template.
You can create a Digikam metadata template under the Settings > Configure Digikam menu. Once it opens up, you can select the Template section on the left hand navigation bar. The right side will change to show your current templates. To create a new one, type in its title at Template Title. Then go through the tabs below to put in your information.
In my case, I was really just changing the copyright information. That meant filling out all of the relevant fields under Rights: author name, copyright, usage terms, source. Under Location, I changed it to the United States. Under Contact, I put in my name and email address. Then click the +Add… button at the top right and it will add the template to your list of templates.
Now you can return to the Batch Queue Manager. I am assuming you’ve closed it and are going to reopen it. If that’s the case, you will need to re-configure all of the settings in the bottom left quadrant. There may be a way to save them between uses but I had to redo those choices each time.
You can double click on apply metadata template now, under Base Tools, and select your just-named template from the drop down that appears in the top right quadrant. If you scroll down that quadrant, you’ll see the information you set in your template.
If everything looks good, you can run the batch. I was only using one assigned tool. In my case, I could click the Run button or the Run All button and get the same result. I had selected for the output to use the same file name, and overwrite the current image. Since I had downloaded all of the images from the web, I felt confident that I could always redownload if something went haywire.
In the end, it went just as I expected. The necessary metadata was inserted. I used Filezilla to upload all of the images. Since Piwigo uses database pointers for the images, it continued to point at the changed files because they used the original file names.
All of this may be belt and suspenders. If people click through, they will be able to see the license information. I often upload my photos from a mobile device, so I may just wait and, after a couple dozen, download them, and run them through the Digikam template. But it’s nice to know that I have a process worked out and, hopefully, have made my images more findable and usable.