• Resolved ch3

    (@ch3)


    For some unknown reason, many of my photos have IPTC metadata that can’t be accessed by the plugin neither when simply using the php command.
    iptcparse($info['APP13']);

    Is there another function or way to read these in php?

    For the record I have verified with a few different desktop applications that the data are there. These photos came from a 40D, with some metadata being added at Adobe Bridge, exported using Camera Raw and added a few more using the old cataloging software Microsoft Expression Media.
    Many photos using the above method work fine and I am still trying to get to the bottom of which step causes the issue.

    thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your question. IPTC information can be stored and accessed in different ways by different tools. Also, many WordPress image processing tools strip the information after the image is stored in the Media Library.

    You might find the information can be accessed using the xmp: prefix, which uses information stored in XMP structures within the image. There are some tips on exploring this information in the Settings/Media Library Assistant Documentation tab.

    If you post a link to one or more of the image files that give you trouble I can investigate further. I will leave this topic unresolved for now in case you need more specific help. Thanks for your interest in the plugin.

    Thread Starter ch3

    (@ch3)

    Thank you for your quick response.
    I am not using any other plugins at the moment and for the shake of debugging I am just running the php command on local files without importing them into the library.
    If you have time, you can try these two files.

    https://pub.ch3.gr/iptc_broken.jpg
    https://pub.ch3.gr/iptc_fixed.jpg

    It’s the same photo where I’ve added random data in various fields.
    iptcparse($info[‘APP13’]) doesn’t return anything on iptc_broken.jpg

    I believe during a period of time, Camera Raw was exporting the jpegs in a different way than in the very past and now. Even if I remove all metadata on those problematic files using ExifPilot and add them back on using either photoshop or Expression Media, IPTC is still unreadable. The only way would be to re-export everything with the current version of Camera Raw and re-apply the metadata from my catalog. That would fix the problem, but it’s a painful process due to the number of photos. Also ideally I would like my website to deal with these odd cases in case it starts happening again in the future.

    thanks a lot for your time.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for the links to broken and fixed image examples. I verified that the broken image contains an APP13 section that has the IPTC data in it but it is corrupted in some way that prevents the iptcparse($info[‘APP13’]) function from extracting it.

    I also found that the IPTC information is also stored in XMP format and MLA’s xmp: prefix should be able to extract it for you. Here’s what I found:

      'mla_xmp_metadata' => 
      array (
        'xmptk' => 'XMP Core 4.4.0-Exiv2',
        'description' => 'MEM caption',
        'title' => 'MEM product',
        'Title' => 'MEM product',
        'Subject' => 'MEM caption',
        'xmlns' => 
        array (
          'x' => 'adobe:ns:meta/',
          'rdf' => 'https://www.w3.org/1999/02/22-rdf-syntax-ns#',
          'photoshop' => 'https://ns.adobe.com/photoshop/1.0/',
          'dc' => 'https://purl.org/dc/elements/1.1/',
        ),
        'photoshop' => 
        array (
          'Headline' => 'MEM title',
        ),
        'dc' => 
        array (
          'description' => 
          array (
            0 => 'MEM caption',
          ),
          'title' => 
          array (
            0 => 'MEM product',
          ),
        ),
      ),
      'mla_pdf_metadata' => 
      array (
      ),
    )
    

    You can use substitution parameters like [+xmp:title+] to use the values in a Content Template or {+xmp:title+} in an [mla_gallery] parameter.

    You can produce dumps like the one above using MLA’s Settings/Media Library Assistant Debug tab. Set the “MLA Reporting” value to something like “0x11”, then go to the Media/Edit Media screen for an item and click the “Map IPTC/EXIF metadata” link to parse the metadata in the file. Go back to the Debug tab and view/download the log file content.

    I am marking this topic resolved but please update it if you have any problems or further questions regarding the above suggestions. Good luck with your application.

    Thread Starter ch3

    (@ch3)

    Thank you so much for looking into this. I will spend some time later on to try and implement what you indicate. I really appreciate you taking the time.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can’t read IPTC in certain files’ is closed to new replies.