Title: Image Metadata
Last modified: February 26, 2017

---

# Image Metadata

 *  Resolved [Ellsinore](https://wordpress.org/support/users/ellsinore/)
 * (@ellsinore)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/image-metadata-3/)
 * Hi, David!
 * I’m getting better at finding the solutions, but this one continues to stump 
   me. I’m trying to do the EXIF field mapping.
 * The metadata for the image showing on the WP edit media page is:
 *  ‘image_meta’ =>
    array ( ‘aperture’ => ‘0’, ‘credit’ => ‘Arthur Smith’, ‘camera’
   => ”, ‘caption’ => ‘This is the Title’, ‘created_timestamp’ => ‘0’, ‘copyright’
   => ”, ‘focal_length’ => ‘0’, ‘iso’ => ‘0’, ‘shutter_speed’ => ‘0’, ‘title’ =>‘
   This is the Title’, ‘orientation’ => ‘0’, ‘keywords’ => array ( ),
 * When I do ALL_EXIF, I get:
 * ”array (
    ‘FileName’ => ‘ca_los_angeles_san_gabriel_cemetery.jpg’, ‘FileDateTime’
   => 1488127956, ‘FileSize’ => 55986, ‘FileType’ => 2, ‘MimeType’ => ‘image/jpeg’,‘
   SectionsFound’ => ‘ANY_TAG, IFD0, EXIF, WINXP’, ‘COMPUTED’ => ‘(ARRAY)’, ‘ImageDescription’
   => ‘This is the Title’, ‘Artist’ => ‘Arthur Smith’, ‘Exif_IFD_Pointer’ => 2136,‘
   Title’ => ‘This is the Title’, ‘Comments’ => ‘T’ . “\0” . ‘h’ . “\0” . ‘e’ . “\
   0” . ‘s’ . “\0” . ‘e’ . “\0” . ‘ ‘ . “\0” . ‘a’ . “\0” . ‘r’ . “\0” . ‘e’ . “\
   0” . ‘ ‘ . “\0” . ‘c’ . “\0” . ‘o’ . “\0” . ‘m’ . “\0” . ‘m’ . “\0” . ‘e’ . “\
   0” . ‘n’ . “\0” . ‘t’ . “\0” . ‘s’ . “\0” . ‘ ‘ . “\0” . ‘f’ . “\0” . ‘o’ . “\
   0” . ‘r’ . “\0” . ‘ ‘ . “\0” . ‘t’ . “\0” . ‘h’ . “\0” . ‘i’ . “\0” . ‘s’ . “\
   0” . ‘ ‘ . “\0” . ‘i’ . “\0” . ‘m’ . “\0” . ‘a’ . “\0” . ‘g’ . “\0” . ‘e’ . “\
   0” . ‘.’ . “\0″ . ” . “\0″ . ” . “\0″ . ”, ‘Author’ => ‘A’ . “\0” . ‘r’ . “\0”.‘
   t’ . “\0” . ‘h’ . “\0” . ‘u’ . “\0” . ‘r’ . “\0” . ‘ ‘ . “\0” . ‘S’ . “\0” . ‘
   m’ . “\0” . ‘i’ . “\0” . ‘t’ . “\0” . ‘h’ . “\0″ . ” . “\0″ . ” . “\0″ . ”, ‘
   Keywords’ => ‘Here is a Tag’, ‘Subject’ => ‘This is the subject.’, ‘WINXP’ =>‘(
   ARRAY)’, )”
 * (I don’t understand all the weirdness in “Comments” and “Author” but left it 
   there in case YOU know what to do with that. 🙂 )
 * I have the two boxes checked for Enable IPTC/EXIF Mapping. All of the following
   have NONE for IPTC value, EXIF for Priority and Replace.
 * Title: template:([+xmp:Title+])
    ALT Text: template:([+xmp:Title+]) Description:
   template:([+xmp:Subject+])
 * It’s updating, but I can’t seem to get anything useful in the “Description” field.
   Is this because they are present in the ALL_EXIF result, but not in the ‘image_meta’
   =>’ array?
 * While I was typing this, I clued into the COMPUTED array and tried:
    template:([
   +COMPUTED:Comments+]) and template:([+COMPUTED.Comments+]) and template:([+COMPUTED:
   Subject+]) and template:([+COMPUTED.Subject+]) but I’m still getting “This is
   the Title” in the Description field.

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Thread Starter [Ellsinore](https://wordpress.org/support/users/ellsinore/)
 * (@ellsinore)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/image-metadata-3/#post-8850067)
 * Well, I guess my basic setup isn’t correct to begin with. I just did “Map All
   Attachments, Standard Fields Now” and got:
 * Waiting: 0, Complete: 1, Unchanged: 1, Succeeded: 0
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/image-metadata-3/#post-8850955)
 * Good to hear from you again. Thanks for all the details you’ve posted regarding
   your metadata mapping adventures. It would be very helpful if you can post a 
   link to the image file(s) you are working with so I can analyze their metadata
   and give you more specific help.
 * EXIF fields like Comments and Author have some encoding problems, which is why
   the COMPUTED array is created by the PHP function that maps EXIF values. You 
   can display the COMPUTED values by coding something like `[+exif:COMPUTED,export
   +]`.
 * XMP data varies quite a bit depending on the tool that added the data to the 
   file. That’s another reason I’d like to have a look at the file(s) myself.
 * By the way, did you work out the issues in your earlier topic [Simple Menu Befuddlement](https://wordpress.org/support/topic/simple-menu-befuddlement/)?
   If so, I’d like to mark it Resolved.
 * Thanks for these new questions and for your continued interest in the plugin.
 *  Thread Starter [Ellsinore](https://wordpress.org/support/users/ellsinore/)
 * (@ellsinore)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/image-metadata-3/#post-8851577)
 * Hi, David! You’re so patient, I really appreciate it. I obviously have no clue
   what I’m doing, but I have made progress!
 * First, yes, please mark the previous topic resolved.
 * This is the link to the page I’m creating:
 * [http://cousin-collector.com/blog/?page_id=690](http://cousin-collector.com/blog/?page_id=690)
 * Obviously, it’s only public now for you to view it, as you will soon see. 😀 
   But the site is lightly trafficked.
 * The code I used for that page is:
 * [mla_gallery]
    post_parent=all orderby=title columns=0 category=photos post_mime_type
   =’image/jpeg’ link=file mla_style=none mla_caption=”template:{+exif:ALL_EXIF+}
   <br /><br />{+title+}<br /><br />{+description+} (Tags: {+exif:COMPUTED,Keywords
   +}) ({+file_size,kbmb(m)+})” [/mla_gallery]
 * (I want to import the “Keywords” as “Tags” so the “Private” keyword limits public
   access to those images, but I haven’t figured out how to do that yet.)
 * If it helps, this is what I’m trying to do: I have thousands of photos and images
   related to my research. I’m trying to catalog them. The best way to do that is
   to put the info in the image metadata so it is preserved. Unfortunately, that’s
   not easily accessed in most image programs — I’m using FastStone. The metadata
   is also not easily searchable. Since the images are already on the server, I 
   can import them into my WP installation and find/search them from there. Some
   can be public, but not all, so that’s one trigger I’m trying to work out.
 * “XMP data varies quite a bit depending on the tool that added the data to the
   file. That’s another reason I’d like to have a look at the file(s) myself.”
 * Yes, that became painfully evident with the different results I was getting. 
   The metadata that you see on that page was done in the Windows Explorer window.
   There are fields at the bottom to enter the information easily — all the other
   programs I tried required a lot of mouse work and I’m a keyboard girl. LOL! Anyway,
   I’m getting consistent results doing it that way, as you can see, so now I just
   need to figure out how to import that info into the Media WP entry, or access
   and style it via the [mla_gallery] codes.
 * I also know I need to use “template” but I’m still working on that, too. 😀
 * It’s a slow work in progress. For instance, I need to enable “tags” in the setting,
   I think.
 * Thank you so much for the help. I’m *almost* there. It seems at this point it’s
   just shortcode syntax issues. 🙂
 * (Hope this isn’t TMI!)
 *  Thread Starter [Ellsinore](https://wordpress.org/support/users/ellsinore/)
 * (@ellsinore)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/image-metadata-3/#post-8851932)
 * Also, ideally, I’d like to include my research documents here, too, that are 
   in PDF format. I played with that a bit, but the metadata is *very* inconsistent
   there, and I had trouble sorting the different mime types by title? Thanks!
 *  Thread Starter [Ellsinore](https://wordpress.org/support/users/ellsinore/)
 * (@ellsinore)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/image-metadata-3/#post-8854098)
 * Hi, David! Another problem I’m having with this is that the HTML in the mla_caption
   isn’t being read. I’ve tried various forms of “template” but I’ve got the syntax
   wrong. I *did* have this working at one point, but don’t know how I did it. 🙂
   I think I do need to use “template” because I’ve now got JPEGs and PDFs on the
   list, and I read at one point that the parentheses make sure that if it doesn’t
   exist, it’s bypassed for that entry. Thanks!
 *  Thread Starter [Ellsinore](https://wordpress.org/support/users/ellsinore/)
 * (@ellsinore)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/image-metadata-3/#post-8854229)
 * Hum — interesting. The HTML for  is rendering, but the <br> and <br /> tags are
   not.
 *  Thread Starter [Ellsinore](https://wordpress.org/support/users/ellsinore/)
 * (@ellsinore)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/image-metadata-3/#post-8854372)
 * That should have been the “strong” tag. FYI — I know the metadata for the PDFs
   is inconsistent. As with the image editor, I need to determine which PDF program
   includes the metadata I need. Simply exporting as PDF from OpenOffice doesn’t
   work. 🙂
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/image-metadata-3/#post-8854428)
 * Thanks for your updates and all the additional information; very helpful. A couple
   of small changes to your shortcode parameters should help. Try something like
   this:
 *     ```
       [mla_gallery mla_caption="{+template:{+exif:ALL_EXIF+}<br /><br />{+title+}<br /><br />{+description+} (Tags: {+exif:Keywords+}) ({+file_size,kbmb(m)+})+}"]
        post_parent=all
        orderby=title
        columns=0
        category=photos
        post_mime_type=image/jpeg
        link=file
        mla_style=none
       [/mla_gallery]
       ```
   
    1. You need `{+ +}` delimiters around the `template:` prefix to make it a substitution
       parameter.
    2. Your `Keywords` are not in the COMPUTED array – they are in the EXIF elements.
    3. The `<br />` tags are filtered out by some MLA logic that tries to repair WordPress
       editor/parsing issues. If you put the `mla_caption` parameter inside the `[mla_gallery]`
       shortcode this logic is bypassed, preserving the tags.
 * Give the above suggestions a try and let me know how they work for you.
 *  Thread Starter [Ellsinore](https://wordpress.org/support/users/ellsinore/)
 * (@ellsinore)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/image-metadata-3/#post-8855550)
 * David, you rock!
 * I still have a lot of tweaking to do, and some more questions that I’ll try to
   find the answers for, but at this point I am no longer completely lost!
 * AND I’ve finally found the “resolved” box!
 * Thank you!
 * Kris
 *  Thread Starter [Ellsinore](https://wordpress.org/support/users/ellsinore/)
 * (@ellsinore)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/image-metadata-3/#post-8858709)
 * Hi, David!
 * I have a couple more questions:
 * (1) Now that I’m using the correct “template” code (thanks!!) I can’t figure 
   out how to get the parentheses to print. For the file size, I want it enclosed
   to set it apart: (163.757 KB). I’ve tried escaping a second set of parens, but
   that’s about it.
 * (2) I’m getting the expected “404” error when trying to use the tags as links.
   They show up fine as tags, the links just don’t work. I found your previous post
   links about the WP limitations on Media stuff, and will be grinding through that
   soon enough.
 * These I don’t know if you can help me with, but maybe you’ve come across them
   before:
 * I’m using these entries for mapping:
 * Category: template:([+pdf:Categories,array+]|[+exif:Keywords,array+])
    Tags: 
   template:([+pdf:Keywords,array+]|[+exif:Artist,array+])
 * and Priority: EXIF, Existing Text: Replace
 * (2) In an attempt to make the process completely automated, I’m trying to process
   the keywords as tags on import. I *did* find the information to do this for both
   JPGES and PDFs (yay!).
 * For the images, by default the tags are separated with semicolons (;). When I
   leave it this way, it doesn’t separate the array, the tag is imported as “Postcard;
   Private” literally. If I separate them with commas, they aren’t imported at all.
   Perhaps a limitation of using Windows Explorer to edit the metadata?
 * (3) Since I didn’t have enough fields in the standard PDF metadata, I got tricky
   and created a custom field in the PDF: Categories. Unfortunately, not only doesn’t
   this get exported, it prevents the “Keywords” from being exported as well — pretty
   much messing up everything I’ve accomplished so far. 🙂
 * Since it’s still early, and I’m working from just a few PDFs and JPEGs to edit
   the metadata and testing it, it’s a small matter to switch gears at this point.
 * Perhaps just using tags or just using categories is the way to go? Any suggestions
   would be appreciated.
 * Thanks!
 * Kris
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/image-metadata-3/#post-8859638)
 * I will respond to your latest post in the new topic you have opened up:
 * [Image Metadata](https://wordpress.org/support/topic/image-metadata-4/)
 * For future reference, you don’t have to “unresolve” a topic to continue the dialog;
   just post an update and I will keep responding to your updates. If you do want
   to “unresolve” the topic, there is a “Status” dropdown control in the right-hand
   column of this screen, with an “Update” button you can use to change the status
   of the topic.
 *  Thread Starter [Ellsinore](https://wordpress.org/support/users/ellsinore/)
 * (@ellsinore)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/image-metadata-3/#post-8861377)
 * Thanks David! I guess, among other things, I’ll have to put learning to read 
   again on my to-do list. 🙂

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Image Metadata’ is closed to new replies.

 * ![](https://ps.w.org/media-library-assistant/assets/icon-256x256.png?rev=973502)
 * [Media Library Assistant](https://wordpress.org/plugins/media-library-assistant/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-assistant/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-assistant/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-assistant/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-assistant/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-assistant/reviews/)

 * 12 replies
 * 2 participants
 * Last reply from: [Ellsinore](https://wordpress.org/support/users/ellsinore/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/image-metadata-3/#post-8861377)
 * Status: resolved