Last week, after I got my camera I started working to customize my photo galleries through the WordPress gallery shortcode. Like everyone else who’s tried, my inspiration was the near perfect design of Ma.tt. One of my favorite features of his gallery is the inclusion of the EXIF profile for each photo on it’s attachment page.
For those who don’t know, EXIF is the exchangeable image file format used to encode details about a photo in the file itself. It records things like shutter speed, aperture, and camera model. Among other things, it can help others see how you achieved the shot, or record where you were (via GPS data, which you can add in Picasa).
I couldn’t get my fields to populate, and found out that there is a required server extension, php_exif, that was probably not enabled on my hosting server. I called my provider, sat on hold for 30 minutes, and got the rough word that it’s not allowed on my shared hosting plan. I’d have to shell out $25/month, or find another way.
I came across php library called Exifer, written by Jake Olefsky, and maintained at Zen Photo. It parses the EXIF data, turning the numerical keys in to strings, and placing them in a multilayer array.
This plugin uses the library to extract the data and displays it as an unordered list on the attachment page below the photo. When you create your gallery make sure you set it to link to “attachment page”. The plugin will automatically insert the code after the image, unless you are using an attachment.php or image.php template. And if your image has no EXIF data, nothing will display. Read more
