• Greeting David. Hoping all is well for you during this interesting era.
    I’ve read through the docs, seems ITPC maps either upon upload or has to be done manually. Been attempting to get images to update their title based on caption. In IPTC/EXIF the title field has a EXIF/template value of template:([+post_excerpt+]). A few things worth noting:

    1. “Enable IPTC/EXIF Mapping when updating media metadata”, “Enable IPTC/EXIF Mapping”, and “Enable IPTC/EXIF Mapping when adding new media” is checked ON.

    2. After uploading image(s) when editing the caption and/or title, the mapping template doesn’t update the image title. It would seem “Enable IPTC/EXIF Mapping when updating media metadata” option is ignored when updating media information?

    3. When using “Bulk Edit Media” followed by clicking Map IPCT/EXIF metadata it updates all selected images so that titles are replaced by captions from the IPTC/EXIF rule. Same thing for IPTC/EXIF tab > Title > Execute. I’m pleased this works perfectly. The reason this is problematic though is that as a site admin I’d have to execute it manually for site users often, Image URLs can break, and users would only see the new titles once manually mapped. Automatically assigning the template rule on image update would solve this. Using CSS could then hide the title field so that users focus their attention on the caption field for good SEO.

    WordPress by default shows the caption field instead of title field when creating a gallery after selection is made. As a result it’s far easier for users to add captions than it is to add titles, especially when uploading hundreds of images. Would be unfortunate to have blank titles when users go through the trouble of adding captions for each image.

    • This topic was modified 4 years, 11 months ago by Josh Journey.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Josh Journey

    (@ljosh)

    “Existing Text” is set to Replace. “IPTC Value” is set to — None (select a value) —. Another interesting fact, when setting an alt rule for EXIF/Template Value template: ([+post_title+]) ; the image alt is updated right away when updating an image caption. When changing the template value of alt to template: ([+post_excerpt+]) it does not work unless manually mapping. This means +post_title+ allows immediate image updates while +post_excerpt+ has to manually be mapped (bulk action or map metadata link).

    Could template:([+post_excerpt+]) be supported for Enable IPTC/EXIF Mapping when updating media metadata? This would allow captions to be auto mapped to the designed area.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your report and for documenting the results of your experiments so far. I want to make sure I understand what you are describing and asking.

    You wrote “It would seem “Enable IPTC/EXIF Mapping when updating media metadata” option is ignored when updating media information?” That is true for the updates you describe. The meaning of “updating media metadata” is very specific. It refers to a WordPress process of updating the “attachment metadata” array associated with each item. When this happens a WordPress filter (wp_update_attachment_metadata) is triggered and the mapping rules are run. Editing item values such as the Title do not trigger this filter.

    You wrote “Image URLs can break, and users would only see the new titles once manually mapped.” I do not understand the relationship between “Image URLs” and “titles”; can you explain this or give an example?

    There are a number of references to “site users” and I am not clear whether these refer to the admin mode screens or front end posts/pages. You wrote “Using CSS could then hide the title field“. It looks like you want to hide the admin-mode Title text box on the Edit Media screen, and perhaps in the Media/Assistant Bulk Edit and Quick Edit areas. Is that right?

    You wrote “Another interesting fact, when setting an alt rule for EXIF/Template Value template: ([+post_title+]) ; the image alt is updated right away when updating an image caption.” I cannot reproduce this on my system. Can you tell me in detail the steps you follow to get this behavior?

    After giving this some thought, it seems that you are asking for an option to run the mapping rules whenever the values assigned to an item are changed. I think that would often cause more harm than good for most users and I am reluctant to consider it for the core MLA plugin. If you have a specific use case in which this makes sense you can always implement it with a small custom plugin that uses the hooks MLA provides. If I can understand you application better I can give you more specific guidance. Thanks for understanding and for any additional details/clarification you can provide.

    Plugin Author David Lingren

    (@dglingren)

    Thank you for your comments and clarifications regarding the questions I had and the points I raised.

    As I wrote in the earlier, related topic (Image Title from Media Library insert to the Post… Image Title is not added):

    There is often confusion about the definition and use of Title, ALT Text and Caption in WordPress applications.

    The WordPress “Title” value for a Media Library item is more of an admin mode convenience than anything else. When a file is uploaded and the item generated, WordPress generates a Title and the item permalink, often from the file name or metadata contained within an image file. The Title may appear on the “Media Page” for the item but is not often used by the theme, in a gallery or when an image is inserted in a page or post.

    The WordPress “Caption” value for a Media Library item is the value used in most display contexts. It tells something about the item, usually a simple declarative statement of what the item represents but sometimes a brief story about the item.

    You refer to both of these, title and caption, in your description of the authors’ maintenance tasks. It seem to me that your problem would be solved if the authors clearly understood how Title and Caption are used in WordPress applications. I don’t see how changing the Title values to match Caption values improves things.

    I am marking this topic resolved, but please update it if I have missed an MLA defect or an MLA-specific question. I wish you every success with your application, and thanks for your interest in the plugin.

    Thread Starter Josh Journey

    (@ljosh)

    “The Title may appear on the “Media Page” for the item but is not often used by the theme, in a gallery or when an image is inserted in a page or post.”

    On an image’s direct media page it utilizes the title field for the h1 tag and title tag which are both very important for SEO. Most plugins that rewrite image filenames utilize the image title field to have url’s such as root/wp_content/media/title.jpg. I suppose with theme hacks and modifying the core plugins it could be changed to use captions instead.

    “The WordPress “Caption” value for a Media Library item is the value used in most display contexts. It tells something about the item”

    Which is what makes it so valuable to leverage it for SEO reasons. Because it’s disconnected from title we often see images not having a good h1, <title> tag, ect let alone one at all. WP’s Media Library list view only shows titles but not captions; thankfully MLA on the other hand displays captions for this view.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Image Title mapping from Caption’ is closed to new replies.