• Resolved vDerekS

    (@vdereks)


    This looks like a great plug-in, extremely powerful, but a tad complicated. I can’t figure out if there’s a way to concatenate multiple IPTC properties (keywords, photo city, photo state, etc.) into the alt text property, automatically?

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

    (@dglingren)

    Thanks for the positive feedback and for your question. I agree, MLA is a collection of power tools and with power comes complexity. I wish I had the time and talent to do more tutorial documentation for it.

    You can populate your ALT Text field from multiple IPTC properties with the Media/Assistant Bulk Edit feature or by creating an IPTC/EXIF mapping rule. The rule can be used to populate the field automatically as new items are added to the Media Library.

    You can find more information in the “EXIF/Template mapping with Content Templates” section of the Settings/Media Library Assistant Documentation tab. A complete list of the IPTC fields is in the “Field-level IPTC Identifiers and Friendly Names” Documentation section. There are some additional tips in this earlier topic:

    Bulk Delete Captions

    Reading thru the above material, I realize that I’ve changed the way the IPTC/EXIF tab looks and works since those were written; I will work on updating the Documentation for my next version. In the interim, you can find the “ALT Text” rule by navigating to the IPTC/EXIF tab and clicking on the “Standard” view to filter the list or simply scrolling through the table. Once you find the rule, click the “Edit” or “Quick Edit” rollover actions to fill in the template you want. For example, to get the fields you mentioned you can code something like:

    template:([+iptc:2#025+] - )([+iptc:2#090+], [+iptc:2#095+])

    The parentheses will suppress output when the values are empty.

    I hope that gets you started on a solution for your application. I am marking this topic resolved, but please update it if you have any problems or further questions regarding the above suggestions. Extracting the IPTC, EXIF and XMP metadata from your images can be an exploration/adventure. I will give you whatever help I can so you get the most out of MLA. Thanks for your interest in the plugin.

    Thread Starter vDerekS

    (@vdereks)

    Thanks for the quick response and detailed info. However, my rule isn’t working. πŸ™

    Name: ALT Text
    IPTC Value: None
    EXIF/Template Value: ([+iptc:2#025+] – )([+iptc:2#090+], [+iptc:2#092+], [+iptc:2#095+], [+iptc:2#100+], [+iptc:2#101+])
    Priority: IPTC
    Existing text: keep
    Status: Active

    I used the Windows Exif Pilot and as far as I can tell, I have the right IPTC fields populated in my photo. I can see them in my media library thanks to another plug-in. I imported a photo and also manually ran the rules and the alt text field didn’t change.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update and for including the details of your rule.

    Did you add the template: prefix to your rule? It is required to distinguish between a content template and an EXIF field name.

    Thread Starter vDerekS

    (@vdereks)

    No, I didn’t realize that was part of the argument. Thanks for pointing that out. I’ve since tried it with, and still doesn’t populate:

    template:([+iptc:2#025+] – )([+iptc:2#090+], [+iptc:2#092+], [+iptc:2#095+], [+iptc:2#100+], [+iptc:2#101+])

    Thread Starter vDerekS

    (@vdereks)

    EXIF Pilot reports I’m using the following IPTC fields (among others):

    City
    Sublocation
    ProvienceState
    CountryName

    My other WP IPTC/EXIF taxonomy plug-in shows populated via my JPG file:
    photo cities
    Photo States
    Photo countries
    Keywords

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your continued testing and updates. I would like to try reproducing your problem on my test system. Could you post a link to one or more of the image files you are using?

    Thread Starter vDerekS

    (@vdereks)

    Thread Starter vDerekS

    (@vdereks)

    cdn.derekseaman.studio /wp-content/uploads/2017/10/1DS_7863.jpg

    Plugin Author David Lingren

    (@dglingren)

    Thanks for posting the image link. I loaded your template into my test system and uploaded a copy of the “1DS_7863.jpg” file. The resulting “Alternative Text” value is showing as “Keyword1 keyword2 keyword3 –”. According to Adobe Photoshop CS6, the Keywords are the only IPTC field populated in this image file.

    It looks like other values are present in the image but not in the usual place; I will investigate this further.

    By the way, the file has just one IPTC Keyword, “Keyword1 keyword2 keyword3”. If you want these to be separate keywords you must separate them with commas or semicolons.

    Do you get different results on your system with this file? Would you like me to test another file?

    • This reply was modified 6 years, 10 months ago by David Lingren.
    Thread Starter vDerekS

    (@vdereks)

    I just opened Photoshop CC and the image…and I get different results. Under IPTC I see:

    Creator
    Country
    email
    website
    date
    sublocation
    city
    state
    country
    copyright notice

    Ironically, I don’t see ANY keywords anywhere in the photoshop dialog box. There’s a free tool called EXIF Pilot that also pulls out the same info from my file.

    Thread Starter vDerekS

    (@vdereks)

    If you want screenshots, use my contact form on derekseaman.studio and we can exchange emails. REALLY appreciate your help thus far…

    Plugin Author David Lingren

    (@dglingren)

    I’ve done more testing and have a better result. I updated your template so each IPTC value is tested separately:

    template:([+iptc:2#025+] – )([+iptc:2#090+])(, [+iptc:2#092+])(, [+iptc:2#095+])(, [+iptc:2#100+])(, [+iptc:2#101+])

    Running the updated template against your test image now gives:

    “Keyword1 keyword2 keyword3 – Glenorchy, 4234 Glenorchy-Queenstown Road, Otago, New Zealand”

    The [+iptc:2#100+] value is not populated in this file. Without the additional parentheses, if any one of the fields is empty then the whole set is suppressed.

    Sorry for my confusion in the earlier post – it’s been a long day. I hope this latest update gives you the results you need. Thanks again for your patience!

    Thread Starter vDerekS

    (@vdereks)

    Better…but have a question about workflow. When I uploaded the photo via the media uploader and went into the Edit media page the alt text just had the file name and my name.

    In order for the alt text to populate with your data, I have to randomly click the two map buttons, update, click some more, and eventually the field will populate. I can’t imagine that is how it should work. I was hoping that it would auto-populate when media is uploaded to the library via the WP load function.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update and the good news about the better results.

    You wrote “I was hoping that it would auto-populate when media is uploaded”. There are two option settings that should give you the results you want. If you navigate to the Settings/Media Library Assistant IPTC/EXIF tab you should check the “Enable IPTC/EXIF Mapping when adding new media” and “Enable IPTC/EXIF Mapping when updating media metadata” boxes, then click “Save Changes” to record the new settings.

    Have you tried that? There are a few different ways to upload media. I’ve had good results with the Media/Add New (Upload New Media) screen but if you can tell me how you are uploading to your site I can try to replicate your results more closely.

    Even if not, the “Map IPTC/EXIF metadata” button on the Media/Edit Media screen or the Media/Assistant Bulk Edit area should work each and every time you click them. Is that not working?

    Thread Starter vDerekS

    (@vdereks)

    Those two options have been checked all along. I import media via the LIbary “add new” button and browse to the file on my computer. After it is imported, I click on “edit” and the alt text just as the file name and my name. I can clear that field and click ‘map IPTC/EXIF metadata” numerous times and nothing populates. This last time I cleared the field, clicked “update” then the map button and it populated.

    I don’t think it makes any difference but I am using Imagify, which compresses image files when they are uploaded. That kicks in 100% of the time when I upload a media file.

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Multiple IPTC properties into alt text?’ is closed to new replies.