• Resolved vigilant_spb

    (@vigilant_spb)


    Hello David! I have a question about WP titles im Media Library.

    I used to fill only titles since 2015, leaving alt empty. Why? Inserting photos like DCIM_1234_01_02_2015.jpg automatically put this filename to “title” field. So I just changed this name to some relevant text AND it did show up in Lightbox/Colorbox when users open full-screen image.

    Now I’ve updated) Gutenberg… It has problems. But. All my old posts, made in classical editor, now show same POST TITLES instead of title from medialibrary.

    It’s colorbox problem, I guess, before it could take image title from Library, now, with new WP, it can’t. It can be fixed somehow, but the problem is I have no title attributes in generated html and there are empty alts.

    I’m talking about standard galleries, generated by shortcode like [gallery link="file" columns="2" size="medium" ids="5776,5777"]

    This shortcode processing takes alt text from ML, where it’s empty, so I have empty alt attribute in generated html – not good for users (they can’t see titles anymore), not good for SEO.

    Titles are obsolete attribute, so I have an idea copy all my titles to alts for every image in database.

    I have Fixit example plugin installed and can do something but not exactly what I want ?? For example, it helps put alts for single images in old posts but not for galleries because they are shortcoded. And I don’t see the way to take image title from library and put it to the ALT in the library, only options like “library→post” and “post→library” ??

    Can you give me advice please? What would you do?

    * new Gutenberg editor works not that way, it generates code using alt from ML if present and putting it right to the code, so Fixit can update every photo in the post, no matter single or gallery, but only in new gutenberg-made posts. Not sure if it’s better or not.. but maybe less DB queries..)

    UPD. The answer was “Go to MLA > IPTC/EXIC > Alt text. Set it’s priority to IPTC, template value to template: [+post_title+]”, this is what I need, all my media now havea alts

    thank you for your plugin!
    not sure if I need it for my usual workflow but it helped me a lot

    • This topic was modified 4 years, 7 months ago by vigilant_spb.
    • This topic was modified 4 years, 7 months ago by vigilant_spb.
    • This topic was modified 4 years, 7 months ago by vigilant_spb.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for taking the time to open a new topic for your questions. Thanks as well for your perseverance and use of the IPTC/EXIF mapping rules to accomplish your goal.

    As you outlined, WordPress has “evolved” from the traditional/classic [gallery] shortcode to the more recent Gutenberg practice of embedding a single image or a “gallery” as hard-coded links within the body of the post/page. I don’t care for it, but at least the old [gallery] shortcode is still available. MLA offers a much more powerful [mla_gallery] shortcode for dynamically composing gallery displays based on, for example, taxonomy term queries.

    You wrote “It’s colorbox problem, I guess,” implying that you are using a lightbox theme/plugin that intercepts the [gallery] shortcode and generates a more elaborate display. These plugins draw from some combination of Title (post_title), Caption (post_excerpt) and ALT Text for their displays.

    The term “Title” is a bit ambiguous. It can refer to the “Title” value for the media library item or the title= attribute in the links generated for items in a gallery. As you observed, WordPress considers the title= attribute to be obsolete and has stopped including it in their gallery displays. The ALT Text value and the alt= attribute are still used and valuable for SEO and accessibility purposes.

    Again, congratulations on solving your problem with a mapping rule. I am marking this topic resolved, but please update it if you have any remaining problems or questions. Thanks for the positive feedback and your interest in the plugin.

    Thread Starter vigilant_spb

    (@vigilant_spb)

    Thanks for your answer!

    While WP can’t work with ALTs properly, having some buttons like “copy alt texts from/to ML” right in the editor or in the post list would be great ??

    *Fixit plugin does its job but you have to open it and enter post ID

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I need to copy my title to alt for all the media in library’ is closed to new replies.