Search Over 30,000 FREE Plugins from the Official WordPress Plugin Directory Repository

JSM's Adobe XMP / IPTC for WordPress

Read Adobe XMP / IPTC information from Media Library and NextGEN Gallery images, using a Shortcode or PHP Class Method.

Retrieve the following Adobe XMP / IPTC information from images in the WordPress Media Library and NextGEN Galleries:

  • Creator Email
  • Owner Name
  • Creation Date
  • Modification Date
  • Label
  • Credit
  • Source
  • Headline
  • City
  • State
  • Country
  • Country Code
  • Location
  • Title
  • Description
  • Creator
  • Keywords
  • Hierarchical Keywords

The extracted XMP / IPTC data is cached on disk to improve performance and is refreshed if / when the original image is modified.

You can use the plugin in one of two ways; calling a method in your theme template(s) or using the [xmp] shortcode in your content.

There are no plugin settings — simply install and activate the plugin.

Retrieve XMP data as an array

$adobeXMP =& adobeXMPforWP::get_instance();

 * Some default class properties can be modified.
$adobeXMP->use_cache = true; // default
$adobeXMP->max_size = 512000;    // default
$adobeXMP->chunk_size = 65536;   // default

 * The $id can be a WordPress Media Library image ID,
 * or NextGEN Gallery image ID in the form of ngg-##.
$image_xmp = $adobeXMP->get_xmp( $id );

echo '<p>Photograph by '.$image_xmp['Creator'].'</p>';

You can also hook the 'adobe_xmp_cache_dir' filter to modify the default cache directory.

Include a shortcode in your Post or Page

[xmp id="101,ngg-201"]

This shortcode prints all the XMP information for Media Library image ID "101" and NextGEN Gallery image ID "201". The XMP information is printed as a definition list <dl> with a class name of xmp_shortcode that you can style for your needs. Each <dt> and <dd> element also has a style corresponding to it's title - for example, the "Creator" list element has an xmp_creator class name. Here's an example of the definition list HTML:

<dl class="xmp_shortcode">
<dt class="xmp_credit">Credit</dt>
<dd class="xmp_credit">JS Morisset</dd>
<dt class="xmp_source">Source</dt>
<dd class="xmp_source">Underwater Focus</dd>
<dt class="xmp_hierarchical_keywords">Hierarchical Keywords</dt>
<dd class="xmp_hierarchical_keywords">What > Photography > 
    Field of View > Wide-Angle > Fish-Eye</dd>

The shortcode can also take a few additional arguments:

  • include (defaults to "all")

Define which XMP elements to include, for example:

[xmp id="101" include="creator,creator email"]
  • exclude (defaults to none)

Exclude some XMP elements, for example to print all XMP elements, except for the "creator email":

[xmp id="101" exclude="creator email"]
  • show_title (defaults to "yes")

Include / exclude the <dt> definition titles.

[xmp id="101" show_title="no"]
  • show_empty (defaults to "no")

Include / exclude empty <dd> definition values.

  • not_keyword (defaults to none)

Exclude a list of (case incensitive) keywords, for example:

[xmp id="101" not_keyword="who,what,where"]

To exclude a hierarchical keyword list, use hyphens between the keywords, for example:

[xmp id="101" not_keyword="who,what,where,who-people-unknown"]
Author JS Morisset
Contributors jsmoriss
Tags adobe, function, gallery, image, IPTC, library, Lightroom, media, meta-data, method, nextgen, photoshop, rdf, shortcode, xml, XMP, xmpmeta

Automated Install

  1. Go to the wp-admin/ section of your website.
  2. Select the Plugins menu item.
  3. Select the Add New sub-menu item.
  4. In the Search box, enter the plugin name.
  5. Click the Search Plugins button.
  6. Click the Install Now link for the plugin.
  7. Click the Activate Plugin link.

Semi-Automated Install

  1. Download the plugin archive file.
  2. Go to the wp-admin/ section of your website.
  3. Select the Plugins menu item.
  4. Select the Add New sub-menu item.
  5. Click on Upload link (just under the Install Plugins page title).
  6. Click the Browse... button.
  7. Navigate your local folders / directories and choose the zip file you downloaded previously.
  8. Click on the Install Now button.
  9. Click the Activate Plugin link.


Version Numbering Scheme

Version components: {major}.{minor}.{bugfix}-{stage}{level}

  • {major} = Major code changes / re-writes or significant feature changes.
  • {minor} = New features / options were added or improved.
  • {bugfix} = Bugfixes or minor improvements.
  • {stage}{level} = dev < a (alpha) < b (beta) < rc (release candidate) < # (production).

Note that the production stage level can be incremented on occasion for simple text revisions and/or translation updates. See PHP's version_compare() documentation for additional information on "PHP-standardized" version numbering.

Changelog / Release Notes

Version 1.3.1-1 (2016/12/18)

  • New Features
    • None
  • Improvements
    • None
  • Bugfixes
    • Fixed the shortcode.php library filename in the SVN.
  • Developer Notes
    • None

Version 1.3.0-1 (2016/12/16)

  • New Features
    • None
  • Improvements
    • Added a new shortcode "show_empty" attribute.
    • The shortcode "include" and "exclude" attribute values are now case insensitive.
  • Bugfixes
    • None
  • Developer Notes
    • Refactored much of the plugin code, including the shortcode class.
    • Added a 'adobe_xmp_cache_dir' filter to modify the default cache directory.
    • The adobeXMPforWP::get_xmp() method now includes a cache (as a class property variable) for the returned array. This improves performance for cases where get_xmp() is called two or more times for the same image ID in the same page load. The get_xmp_raw() method still saves the XMP / IPTC information on disk, provided the use_cache class property variable is true, which is valid so long as the cached file modified time is newer than the image modified time.

Version 1.2.1-1 (2016/08/02)

  • New Features
    • None
  • Improvements
    • Maintenance release.
  • Bugfixes
    • None
  • Developer Notes
    • None

Frequently Asked Questions

  • None

Other Notes

Additional Documentation

  • None
Version 1.3.1-1

Requires WordPress version: 3.8 or higher

Compatible up to: 4.7.2

Last Updated 03 Feb 2017

Date Added: 10 Apr 2013

Plugin Homepage


5 stars
2 ratings


Not Enough Data

Works: 0
Broken: 0