When I reviewed the photo gallery theme on monday I pointed to my photoblog where I was using it as an example. In some of my posts I was displaying the photo’s EXIF data and today someone asked me how I did that. The answer to that question is that I wrote a script a while back to do it for me; however, WordPress 2.5 has new capabilities and one of these is extracting IPTC and EXIF data from photographs when they are uploaded. So I set about finding out how to access it.
So far I haven’t been able to find any specific functions for displaying the data that is generated. I guess this is what Matt meant when he tagged it as a bonus feature. If anyone has any ideas about displaying it using template tags then let me know, but for the time being I have written a small plugin to display that data.
Here is a sample below:

[photodata]
Once downloaded and installed you need to include the following code in your post:
[photo-data:#]
Replace # with the ID of the attachement. This is easy to find by looking at the code that WordPress adds to your post. WordPress includes a class of wp-image-229, where 229 is the ID.
I have written this fairly quickly so it has been tested on one WordPress 2.5 blog: this one. I am happy to hear any suggestions about ways to improve it.
This has now been updated to take advantage of the shorttags in WordPress 2.5. It is also even easier to use because a URL can be passed instead of an ID. Please visit the link below for the read me file.
You can Download it here fun-with-photo-data
(__)
`
travesti
thank you good
(__)
`
Andrew Rickmann
David, I have update the plugin. You can now choose what message is displayed. If you wipe it so it is blank then nothing will be displayed, not even the title. The plugin page is here: http://www.wp-fun.co.uk/fun-with-photo-data/
(__)
`
david smeaton
hey andrew, this is a great plugin!!! i love it because it's so simple … i'm the first to rate your plugin here, i gave it 5!! :)
i have a suggestion for future versions (i'm hoping you're going to continue updating this plugin). when the photo has no exif, it says 'no data available for this image', it would be great to have a check box on the options page to not show this comment. all of my digital photos have exif, but my film scans have no exif data. instead of showing a 'no data' comment, i'd rather it said nothing at all.
of course, i can comment that part out of the script (or change the comment to read nothing), but for simplicity it would be great to have a checkbox that gave the same option.
anyway, love your plugin … simple and useful.
thanks for your hard work.
cheers
david
http://www.davidsmeaton.com
(__)
`
teknoloji
I need it for my photo blog. :)
(__)
`
Sa
Good plugin Andrew.Thanks.
I need it for my photo blog.
(__)
`
Shutter Themes | WP-Premiums
[...] image resizing plugins and scripts out there (such as Viva Thumbs, TimThumb, or Get the Image), and Andrew of Fun with WordPress has created a plugin to facilitate the inclusion of EXIF [...]
(__)
`
Joshua
Andrew,
Fantastic plugin! I couldn’t figure out how in the world to have WordPress just do this itself, but this one works perfectly. What about the possibility of having it automatically insert the shortcode into any post that contains just one image, for example? (Just to save me some time! ;-)) Thanks again for the work!
(__)
`
Chris Osborne
What fun. The people over at Flickr think that if someone wants to see the EXIF, they should go over there and see it. And I’d rather let people see it right from my blog.
(__)
`
Andrew Rickmann
Chris,
I don’t know how Flickr handles these kinds of things but as it resizes images it may or may not remove the information from the image, so perhaps it is possible to extract the information from the image, or perhaps you would need to interface with the Flickr API and see if it is possible to pull the information out that way.
Either way it is a completely different thing to what this plugin does so this plugin would be of no use as a starting point.
As this does is pull information from the WordPress database and put it on screen. The WordPress core does the real work.
(__)
`
Chris Osborne
I figured that was the case when I read, but I thought I’d ask anyway.
After looking around everywhere it seems that’s what all the plugins do. Just based purely on theoretical stuff, would it be easier for someone to work from this to get what I want or would it be better for me to start from scratch?
(__)
`
Andrew Rickmann
Chris,
This pulls data from the WordPress database. It doesn’t read any information from the images themselves and so won’t work with images from anywhere else.
(__)
`
Chris Osborne
Is there a way to make this work with images hosted at Flickr?