Truncated Title/Alt Text
-
hi there
awesome plugin! i’ve noticed that after i’ve defined the field for title and alt text in the MLA plugin, both of those field are truncated/cut off in the image library upon upload. i’ve been manually copy-pasting the full title/alt text for every images, but this is of course a huge pain. how do i lengthen these text fields so that they read the entire title/alt text string?thanks
brian
-
Thanks for the kind words and for your question.
You wrote “I’ve defined the field for title and alt text in the MLA plugin“; can you tell me the data source you are using for the Title and ALT Text fields?
It sounds like you have defined mapping rules for these fields; is that right?
You wrote “I’ve been manually copy-pasting“, can you tell me where you copy the full values from?
Any additional information you can provide will allow me to give you more specific help; thanks.
Under I map iptc/exif as follows:
Title = None Selected
Alt Text = 2#005 object-name
Caption = 2#120 caption-or-abtractWhen I upload the images through Add Media or in the media library, I will copy-paste the full alt text and titles. I’m copying them from my photo software where i’ve input that info.
Does that answer your questions?
Thanks!
Thank you for your update with the additional information.
The IPTC Specification says that “2#005 Object Name” is limited to 64 characters; are your values longer than that?
The specification also says that “2#120” is limited to 2000 characters, so that shouldn’t be a problem.
The MLA mapping code does not impose any maximum length on these fields. You can look at the source data by adding these shortcodes to a post or page:
[mla_gallery ids="2756,2757,2758" mla_caption="{+exif:ALL_IPTC+}"] [mla_gallery ids="2756,2757,2758" mla_caption="{+iptc:2#005+}<br>{+exif:ALL_EXIF+}"]
Replace the
ids="2756,2757,2758"
values with some ID values of your own images; you can find the ID value in the “ID/Parent” column of the Media/Assistant submenu table.You might find, for example, that the EXIF “ImageDescription” or “COMPUTED.UserComment” value is better than IPTC “2#120”. There is often an EXIF “Title” field you could use instead of “2#005”.
If you can post a link to one or more of your images I can look at them and see what is happening. If you’d like to send them by e-mail, give me your contact information and I will respond with an address where you can send them. You can use the Contact Us page at our web site:
It would also be useful to know what “photo software” you are using to input the data.
Thanks for your patience and for your interest in the plugin.
The caption is definitely not a problem. 2000 characters is enough.
It’s the alt text and title that i need to fix. i did notice that when i don’t upload an image thru mla that wordpress reads the entire title string with no character limitations. it’ll pull the image filename (which can be long) and make that the title in the media library. so mla is creating this character limit issue.
Is that what you need?
thanks again
Thanks for your update with the link to a sample image. I copied the file to my test system and examined it.
There is no ITPC or EXIF meta data in this file.
If you want to use the file name as your ALT Text and/or title I suggest you use a mapping rule along the following lines:
IPTC Value: — None —
EXIF/Template Value: template:[+file_name+]
Priority: EXIF
Existing Text: KeepIf you have other images with IPTC and/or EXIF data in them I can make other suggestions. Let me know what else I can do to help.
This photo also has truncated title/alt text.
The plugin wp-picshield is stripping all metadata from the file, but it does have metadata.
so i tried your suggestions and it still brings in a truncated title. it doesn’t use the filename for some reason. it uses the image tite. it doesn’t bring in any alt text. what i want is to map the image title (not filename) to both the title and alt text fields. looks like this can’t be doine without them being cut short.
thanks
Thanks for your update with the additional information.
It sounds like the rule I suggested isn’t working for because the ALT Text field already contains a value. You might have better results if you change the “Existing Text: Keep: to “Existing Text: Replace”; that will over-write any existing text with the file name.
The second photo link you provided is very helpful. This image contains a lot of meta data, including a 96-character title that begins with “Leza Art”. The IPTC 2#005 field contains the first 64 characters of the title, which is the maximum length of that field. MLA is using the full length of the IPTC value.
The full 96-character title does not appear in any of the IPTC or EXIF fields available for mapping. It is stored in the “dc:” portion of the XMP meta data embedded in the image. In fact, this is the first image I have seen that has XMP meta data that is not available in the corresponding IPTC/EXIF fields.
The current MLA version does not provide direct access to the XMP meta data for image files. It does have the code required for the job, which MLA uses for PDF documents. I have always planned to add XMP access when it became necessary, and your application provides a great test case. I just received another vote for XMP support as well:
Mapping Lightroom IPTC to WordPress Fields ADVICE
I will work on adding XMP access in my next MLA version, and I will post an update to this topic as soon as I have a Development Version you can try out. Thanks for motivating this new feature and for your patience while I develop it.
I have uploaded a new Development Version that adds XMP support for mapping rules and the
[mla_gallery]
shortcode.For IPTC EXIF mapping rules you can access XMP data in the EXIF/Template text box. For example, the full 96-character title in the image you gave in your post can be accessed as “
template:([+xmp:Title+])
“. More information can be found in the “Field-level prefix values” section of the Settings/Media Library Assistant Documentation tab.You can find step-by-step instructions for using the Development Version in this earlier topic:
It would be great if you can try extracting XMP data from as many images as you can.
I will leave this topic unresolved until the new feature is released in the next MLA version. If you get a chance to try the Development Version, let me know if it meets your needs. Thanks for your interest in the plugin.
Ok I’ll give it a try and let you know. Thanks for the detailed info. You’re the best!
thank you! it worked! brilliant!
it would be perfect if you included some xmp mapping values with the iptc values. a lot of people like me who are not developers have absolutely no idea how to create a template to get the result they need.
once again, amazing work, david.
Thanks for your updates with the good news. I am happy the XMP support is working in your application.
The Settings/Media Library Assistant IPTC/EXIF and Custom Field tabs date back to the early days of the plugin, and could use some significant improvements (to put it politely). It is definitely on my list of future enhancements, but it is a sizable task. Thanks for adding your voice to the discussion.
I have just uploaded a new Development Version with improved XMP support inspired by this related support topic:
Mapping XMP from images to Att. Tag
You may find the new features useful in your application.
I have released MLA version 2.10, which contains the XMP support this topic requires.
I am marking this topic resolved, but please update it if you have any problems or further questions regarding XMP meta data support.
- The topic ‘Truncated Title/Alt Text’ is closed to new replies.