• 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

  • Using a Google Maps API Key
  • 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.
Took a little break to walk around the block tonig Took a little break to walk around the block tonight and these things caught my eye: crepe myrtle flowers, callistemon and bee (nice to see a bunch of bees around!), lily pily, and vine tracks on a fence.
Today was a bit hard. I’m glad it’s nearly ove Today was a bit hard. I’m glad it’s nearly over, but I’m glad to have been here all the same.
#marksymonds
Autumn has arrived!She says on the predicted hot Autumn has arrived!She says on the predicted hottest day in years...#autumn #autumnleaves
Built the Lego Succulents this week. I like the li Built the Lego Succulents this week. I like the little blurbs they write about each plant, like how the moon cactus (tall one at the back) needs to be grafted onto another to grow because of its red chlorophyll. I wasn’t keen on the suggested arrangement with the small ones around the outside because I’ll have this on a shelf, so I rearranged them, but I feel like something needs to go in the front left 🤔 We shall see!#lego #legobotanicalcollection #legosucculents
Work in progress: micro Hogwarts! It started with Work in progress: micro Hogwarts! It started with the Build Your Own Hogwarts bag, and I decided I wanted to try to do all or most of Hogwarts! I don’t have enough pieces though (I’ve already run out of roof tiles), I will keep working on the tan structures while I decide whether to get more of the same bags, or order sand green pieces separately.
#lego #legoharrypotter #legomicroscale #buildwhatyoulove
I can’t believe I didn’t think of this sooner! I can’t believe I didn’t think of this sooner! So many dropped snacks could have been avoided 🤦🏻‍♀️ #mumhacks
So intricate! #dragonfly So intricate! #dragonfly
Good times in the dojo today! #gkrkarate #karate # Good times in the dojo today!
#gkrkarate #karate #marksymonds
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
  • Sistaco Nail Powder Review
    Sistaco Nail Powder Review
  • Bible reading printouts
    Bible reading printouts
  • Custom bible reading plan
    Custom bible reading plan
  • bbPress Forum Icons
    bbPress Forum Icons
  • Gooooooooogle
    Gooooooooogle

Follow Me On…

  • Instagram
  • Twitter
  • GitHub
  • LinkedIn
  • YouTube

Categories

Copyright © 2023 · Kristen Symonds · kristarella.blog