• Resolved Justin

    (@jgweekes)


    I’m having quite the wrestling match with this one. I have external software (Photomechanic and Lightroom) to fill IPTC and Exif field in the meta data of an image. When an image is loaded into WP the field headline is auto-filled to Title without MLA mapping. What I would like to do is map the Headline field in IPTC/Exif to the ALT Text field. Can this be done for existing images and then for subsequent uploads?
    I have read through most of the help page within the plugin. There is a conflicting instruction in the EXIF/Template mapping with Content Templates section.

    “If you code the “template:” prefix at the beginning of the EXIF/Template value you have all the power of Content Templates at your disposal. Do not add the “[+” and “+]” delimiters; the prefix is all you need.

    A template can be used to access any XMP metadata your items contain. For example:

    template:([+xmp:Title+])
    template:([+xmp:Regions.RegionList.*.*.Name,array+])”

    The page I need help with: [log in to see the link]

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

    (@dglingren)

    Thanks for your question. If I understand you correctly you want to map the IPTC 2#105 “headline” value from your image file to the WordPress standard ALT Text field; is that right?

    You can define an IPTC/EXIF mapping rule for the ALT Text field to accomplish your task. Since the metadata you want is in an IPTC field, you do not have to use a content template for this purpose. Here is a rule that should work for your application:

    1. Go to the Settings/Media Library Assistant IPTC/EXIF tab.
    2. If you want to apply the rule to new items as they are uploaded, check the “Enable IPTC/EXIF Mapping when adding new media” and “Enable IPTC/EXIF Mapping when updating media metadata” boxes.
    3. Locate the “ALT Text” rule entry in the table and click the “Edit” rollover action.
    4. In the “IPTC Value” dropdown control select the “2#105 headline” value.
    5. In the “EXIF/Template Value” text box leave the default, empty value in place.
    6. In the “Priority” dropdown, select “IPTC”.
    7. In the “Existing Text” dropdown, select “Replace” to replace existing term assignments or “Keep” to retain any existing values.
    8. In the “Status” text box, select “Active”.
    9. Scroll down to the bottom of the screen and click “Update”.

    Once you define a rule you can apply it to a single item, multiple items or all items:

    • To map a single item, go to the Media/Assistant submenu and click the thumbnail of the item you want (or click the “Edit” rollover action) to get the Media/Edit Media screen. You can click the “Map IPTC/EXIF metadata” link to run your rules on this item, then scroll down and look at the “Alternative Text” meta box to inspect the results.
    • To map two or more items, go to the Media/Assistant submenu and click the checkbox next to the items you want. Then, select “Edit” from the “Bulk Actions” dropdown above the checkboxes and click “Apply” to open the Bulk Edit area. Click the “Map IPTC/EXIF metadata” button to run your rules on the selected items.
    • To map all of your items, stay on the Settings/Media Library Assistant IPTC/EXIF tab and click the “Execute” rollover action for the ALT Text rule. This may take a while.

    You wrote “There is a conflicting instruction in the EXIF/Template mapping with Content Templates section.” I am not sure what the conflict is, but here are two possible explanations. First, you may be referring to the lack of the “[+” and “+]” delimiters. The delimiters are required in shortcode parameters and markup templates to mark their beginning and end, but in the Quick Edit, Bulk Edit and EXIF/Template text boxes they aren’t needed; they fill the entire text box. Second, you may be referring to “A template can be used to access any XMP metadata”. That’s a poor choice of words; templates can access IPTC, EXIF and XMP metadata as well as any of the field-level data sources MLA provides.

    Let me know which conflict you were thinking of and I will update the Documentation to clarify.

    I will leave this topic unresolved until I hear back from you in case you have problems or further questions regarding the above suggestions. Thanks for your interest in the plugin.

    Thread Starter Justin

    (@jgweekes)

    David

    Thanks for clearing that up. It is working now.

    I think I discovered I have 2 problems. Manually added Title and Captions in WP Media were not transposing to ALT Text. Apparently filling these fields do not write to the actual image metadata.

    I tried to create a rule in Custom Fields but no luck.

    How would one create a rule for those images that were manually entered in WP for the fields Title and Caption or Name to be mapped to AlT Text field.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with the good news and the additional details.

    You wrote “Manually added Title and Captions in WP Media were not transposing to ALT Text. Apparently filling these fields do not write to the actual image metadata.” That’s correct; The Title, Caption and other Media fields exist in the WordPress database, but nothing in WordPress or MLA ever writes information back to the metadata contained in the attached image files. That is a deliberate design decision.

    You wrote “I tried to create a rule in Custom Fields but no luck.” As you discovered, the Custom Fields tab and rules are only able to create and update WordPress Custom Fields, not the standard fields and taxonomy term assignments. It’s a little confusing, but goes back to the early days of the plugin and is impossible to untangle at this point.

    You asked “How would one create a rule for those images that were manually entered in WP for the fields Title and Caption or Name to be mapped to ALT Text field?” I assume this is a one-time task to get caught up with past activity. There’s no way to identify and separate out “those images that were manually entered in WP for the fields Title and Caption or Name” and automatically run a rule for just those items. However, there are some ideas you may find useful.

    First, the “Name” field isn’t very helpful. It is usually derived from the Title field, reformatted to eliminate spaces and uppercase letters and punctuation, and then modified to make it unique. I don’t advise using it in an ALT Text value.

    I would suggest modifying the rule you have to use the IPTC headline, if available, or a combination of the Title and Caption fields if there is no headline value; would that work? A couple of modifications to the steps outlined in my last post are required.

    First, in step 5, add a content template to the EXIF/Template text box. You can try something like template:([+post_title+])(, [+post_excerpt+]). The parentheses ensure that missing values for the Title or Caption are simply ignored. The data source names reflect the names used in the WordPress database for Title and Caption respectively.

    Second, in step 7, select “Keep” if you only want to add ALT Text values to items that don’t have one, or “Replace” to start from scratch and update all your items. I suggest you start with “Keep” and review the results.

    I am marking this topic resolved, but please update it if you have problems or further questions regarding the above suggestions or any other aspect of MLA’s mapping rules. Good luck with your application.

    hi, is this applicable to new images…
    i wish when i upload the alt text get filled automatically with the image title.

    Plugin Author David Lingren

    (@dglingren)

    @criticsdesign – Yes, the mapping rule can be applied automatically to new images as they are uploaded to the Media Library. Look for step 2. in my earlier post:

    If you want to apply the rule to new items as they are uploaded, check the “Enable IPTC/EXIF Mapping when adding new media” and “Enable IPTC/EXIF Mapping when updating media metadata” boxes

    You will have to know which IPTC/EXIF/XMP field holds the “image title”. You can find some possible sources in the “WordPress default title, slug and description mapping” section of the Settings/Media Library Assistant Documentation tab.

    If you have any problems or further questions regarding the process, start a new support topic and I will give you what help I can. If you need help with the location of the “image title”, post a link to one or more example images and I can investigate. Thanks for your interest in the plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Mapping IPTC/Exif to ALT Text’ is closed to new replies.