• Skip to primary navigation
  • Skip to main content
  • Skip to footer
  • Home
  • About
  • My Blogs
    • Photoblog
    • Knots
    • WP.com tips
kristarella.blog

kristarella.blog

Happiness Engineer at Automattic, lover of knitting, crochet, sci-fi and more

  • Presentations
  • Plugins
    • Exifography
  • Contact
You are here: Home / Exifography

Exifography

Contents
  1. What is Exifography?
    1. Download current version
  2. Installing the plugin
    1. field options
    2. automatically
    3. via shortcodes
      1. fields
      2. for specific (and multiple) images
    4. display to your theme
      1. Display only some fields of the first attached image
      2. Display all fields of a certain image
      3. Display certain fields of a specific image
  3. More Tutorials
  4. Support
  5. Localisation
  6. License
  7. Upgrading from Thesography

What is Exifography?

Exifography displays EXIF data for images uploaded with WordPress. It utilises WordPress’ own feature of storing EXIF fields in the database, and also enables import of latitude and longitude, exposure bias and flash fired EXIF to the database upon image upload.

Exifography was previously named Thesography, and only had auto-insert into posts in the Thesis theme from DIYthemes. The plugin now works the same way across all themes, so I wanted to change the name to increase visibility and understanding of what the plugin does.

I’ve been using EXIF display on my photoblog for some time. I’ve also written a couple of posts about EXIF with WordPress; Geo EXIF data in WordPress and Add image EXIF metadata to WordPress. Some people expressed a desire to see this functionality in a plugin without modifying WordPress files: this is it.

The purpose of this plugin is to make dislaying EXIF data as convenient as possible, while using as much of WordPress’ native image handling as possible — for convenience, forward compatability and because WP image handling has come a long way since its advent.

Download current version

v1.3.1

Installing the plugin

You can use the built in WordPress installer, by searching for “Exifography” in the Plugins > Add New panel, or follow these steps:

  1. Upload the Exifography folder to your wp-content/plugins directory.
  2. Visit the plugins page of your WordPress dashboard and activate the plugin.
  3. Visit the Exifography Options page under Settings in your WordPress dashboard.

EXIF field options

There are 3 ways to specify which fields are displayed:

  1. on the main options page — these are the default options and can be overridden by either of the other two options
  2. individual post options — if you have the default options set, the post options will automatically inherit those, but if you change the options on an individual post it will use these instead, and if you deselect all the options on a post exif won’t display for that post
  3. shortcode options — if you insert a shortcode into a post it will use first the options that you give it, if you don’t give it any it will use the post options, and if there are none of those it will display all the fields available for that image

Display EXIF automatically

Automatic EXIF display inserts the data for the first image attached to the post at the end of the post.

Display EXIF via shortcodes

EXIF data can be displayed anywhere in your posts via shortcodes. Unlike automatic display, you can display EXIF for multiple images when using shortcodes by specifying the ID of the image.

Use the syntax [exif].

By default the shortcode will display the EXIF items set in the post options, if there are none of those it will show all available exif items for the first image attached to the post.

Display certain EXIF fields

To select the fields you want to display use the attribute “show”.

[exif show="aperture,location,shutter"]

The following list contains valid arguments for the attribute “show”.

  • all
  • aperture
  • credit
  • camera
  • caption
  • created_timestamp
  • copyright
  • exposure_bias
  • flash
  • focal_length
  • iso
  • location
  • shutter_speed
  • title
Display EXIF for specific (and multiple) images

To show the EXIF for a specific image and potentially multiple images within a post, use the attribute “id”. To show multiple images, use the whole shortcode multiple times with different IDs.

[exif id="457"]

You can find the shortcode with ID for an image by viewing the image details in the media dialogue. Press this button to bring up the dialogue: .

Then copy the shortcode from the image details and paste it into the post.

Add EXIF display to your theme

You may also add EXIF data to your theme manually using the function exifography_display_exif($options,$imgID);. This can be used within the loop, with or without an image ID, or outside of the loop if an image ID is provided. To make sure that your theme doesn’t break if the plugin is disabled, use this check to check if the function is there before using it.


The function accepts two parameters: the options for the EXIF items to display and the image ID. If no image ID is provided it will default to the first image attached to the post. The options parameters are the same as those for the shortcode parameters.

In Thesography the display function was just called display_exif(); I found this to be too generic, so I’m deprecating it. The old function will still work for a time, but please switch to the new one soon.

Display only some fields of the first attached image
echo exifography_display_exif('aperture,shutter,iso');
Display all fields of a certain image
echo exifography_display_exif('all',457);

or

echo exifography_display_exif('',457);
Display certain fields of a specific image
echo exifography_display_exif('aperture,shutter,iso',457);

More Tutorials

  • IDs and classes in Exifography output
  • Filtering Exifography output
  • Add EXIF to WordPress gallery images
  • Using photo location data

Support

If you need support for this plugin please post it to the WordPress Forums. I will monitor the forum, but if you don’t get a reply please email me the link to your forum thread.

Localisation

Exifography supports language localisation. If you would like to contribute a translation to be included with the plugin please contact me. You can also keep your own translation in your wp-content directory by putting your .mo file in wp-content/languages; it should automatically load from there if the file is called exifography-lang.mo, where “lang” is the appropriate language code for WordPress (you can find yours in the WordPress Codex).

Exifography comes with its own .po file in the plugin’s languages folder, which contains all the translatable strings. You can use this with software, e.g., Poedit, to make your own translation.

Big thanks to Alejandro Herrero for working out the bugs with language file referencing in v1.0.2.

License

Exifography is licensed under the GNU General Public License.

Upgrading from Thesography

Notes on upgrading from Thesography:

  • I have changed some of the exif field parameters back to the way they are saved in the database for efficiency and tidiness in the code. The old parameters will still work, but that’s why they are a bit different in the documentation now.

 

Happy 11 months to my bubba!He is crawling all o Happy 11 months to my bubba!He is crawling all over the place, and starting to stand and climb (especially mount mummy), and he's still chewing on everything. He has five teeth and is a fan of satay chicken (last video).I thought we had semi-miraculously graduated to sleeping 12 hours at night without calling out for us, but turns out it's a work in progress 🤷🏻‍♀️#marksymonds
Happy 10th birthday Monty! I didn't like you so mu Happy 10th birthday Monty!
I didn't like you so much when you first arrived, peeing on everything, including the carpet and Kaylee rabbit, but you soon became a beloved member of our family 🐰❤️🎉
Second photo is from his first day with us.
Another fun day at the zoo! I was excited to see h Another fun day at the zoo! I was excited to see how great the Vivid displays look during day since I didn't try to see them at night. Mark wasn't quite ready for photos with the gorilla sculptures. He stared at the mummy gorilla for some time and then decided he didn't like it and started to cry 😢 a cuddle with human mummy fixed that 😂
#marksymonds
This cheeky monkey is ten months old today!He h This cheeky monkey is ten months old today!He has 3 teeth out, and that tongue is often out feeling what is going on with those too! He is super close to crawling. He can shuffle himself around and did a couple of alternate knee motions yesterday before slipping onto his tummy again. He doesn't like lying down and sits up at every opportunity. He is rubbish at sleeping (worse than ever), but usually makes up for it with how happy he is during the day.#marksymonds
Final day is stack day for #LEGODisneyHabitats wit Final day is stack day for #LEGODisneyHabitats with @brickfambuilds and @trickybricks!I only made 4 habitats this time, so for a balanced stack I threw in my Magic Kingdom castle and Mickey from last year.I made a couple of small improvements on some of the habitats too: a clock and key for Alice, an extra wall row for Luke and Leia (somehow I made that one too short 🤦🏻‍♀️) and the finishing top rail for Ariel and Eric, which I think goes nicely next to the rabbit hole.#lego #afol #legohabitat #legohabitats #legohabitatstack #legodisney #legodisneyhabitatstack
"She don't got a lot to say, but there's something "She don't got a lot to say, but there's something about her..."Ariel and Eric in #LEGODisneyHabitats with @brickfambuilds and @trickybricksI think this might be the closest that my vision of a habitat has turned out in the actual bricks. Happy 👌🏻#lego #legohabitat #legohabitats #afol #thelittlemermaid
Introduced mum to LEGO set building today with the Introduced mum to LEGO set building today with the bonsai! We decided to combine the green and pink foliage.
Also, I was a bit excited to get a teal brick separator 😆 I've only had orange ones so far.#lego #afol #legobotanicalcollection
"Aren't you a little short for a storm trooper?" - "Aren't you a little short for a storm trooper?" -LeiaThis took a little doing to make the door alcove. I'm pretty happy with the result. With more pieces it could be even better.Day 4 of #LEGODisneyHabitats with @brickfambuilds and @trickybricks, and #letsbuildtheforce with @brickhuntress#lego #afol #legostarwars #legostarwarsmoc #legohabitat #legohabitats #starwars #letsbuildseries
Follow on Instagram

Footer

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Top Posts & Pages

  • Home
    Home
  • Bible reading printouts
    Bible reading printouts
  • CSS Custom Headers
    CSS Custom Headers
  • WordPress: Exclude child categories from category archives
    WordPress: Exclude child categories from category archives

Follow Me On…

  • Instagram
  • Twitter
  • GitHub
  • LinkedIn
  • YouTube

Categories

Copyright © 2022 · Kristen Symonds · kristarella.blog