• I’m building a website to display genealogy-related family photos. Locally, my photos are named sequentially with a five-digit number, e.g. 00317.jpg, 00318.jpg, etc. If the back of a photo has writing on it, the next photo in sequence will be a scan of the back of that preceding photo. So I need my uploaded photos to be titled with the photo’s filename, which is the default WP behavior … sometimes.

    For these old family photos, before uploading, I am using IrfanView to add a Caption to each photo’s IPTC metadata. This IPTC field consistently maps to the WP Caption field on upload.

    My problem is that sometimes my uploaded photos are titled with the filename, and sometimes my uploaded photos are titled with the text from the IPTC Caption. In the latter case, the text from the photo’s IPTC Caption metadata appears in both the photo’s WP Title and Caption fields.

    I have been unable to determine a pattern to this seemingly inconsistent behavior of assigning titles to photos upon upload. If anyone could tell me why this is happening, or where else to look, that would be most appreciated.

    Downstream of this problem, I am using the plugin Enhanced Media Library PRO to manage media tags and the plugin FooGallery (Premium) to create dynamic photo galleries based on those media tags.

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • I have no idea, but I’d try various sectors, like:
    – uploading images “as part of content”, vs. uploading to media library directly.
    – uploading images one at a time vs. bulk-upload.
    – uploading using Ajax-like functionality, vs. http post (with page reload)…

    Thread Starter Rob Mahan

    (@robmahan)

    Thanks for the suggestions @tobifjellner. I will try them as I continue to process photos, to see if I can discern a method with consistent results. (I don’t know what uploading with Ajax-like functionality means, but I’ll try to figure that one out myself.)

    If anyone could educate me on the WP core functionality that handles media titling upon upload, and whether that functionality is dependent on the upload method used, that would also be helpful.

    I have only started to see the inconsistent behavior with photos that have text in the IPTC caption metadata field. In my past experience, uploaded photos without that metadata have consistently been titled with the photo’s filename.

    I know I can “fix” the photos that end up with the IPTC caption duplicated as the title once they are in my Media Library by manually editing the media title back to the original filename, but that a bit inefficient.

    I’m also going to try filling in the IPTC headline field with the filename before uploading the photos. The IPTC headline field seems to map to the WP media title field. It’s still an additional step, but if it works, perhaps it will be better than having to “fix” the titles manually after the photos are uploaded.

    • This reply was modified 2 years, 4 months ago by Rob Mahan.

    Ajax is the concept of a JavaScript in the browser talking to the server and perhaps uploading stuff or renewing just a part of the screen. Just like the block editor runs in the browser and then talks to the server via WordPress’ REST API.

    The “post” upload may be referred to as “legacy” solution.

    Thread Starter Rob Mahan

    (@robmahan)

    I haven’t found an answer to my original question, but I have implemented a workaround that produces consistent media title results upon upload.

    Prior to uploading, adding the filename (without the extension) to the Headline IPTC metadata field results in WP using that filename for the media title whether the Caption IPTC metadata field is filled out or not.

    I also learned that the IrfanView IPTC editor includes wildcard capabilities for editing IPTC metadata for several photos (JPG files) at the same time. I’m using the wildcard N$ in the Headline field when editing the IPTC metadata for more than one photo at a time, which pulls the unique filename (without the extension) of each photo into the Headline field when the metadata is written.

    This workaround addresses my original question fairly efficiently, but I’m still curious as to the reason behind the seemingly inconsistent WP behavior outlined in the OP.

    Just curious on your downstream image handling of IPTC meta data. Does your tag management include ‘keywords’? I find it quite frustrating that WP does not have an out-of-the-box way to dynamically display images based on the standard: spec set else where in photo editing/gallery software.
    Thanks.

    Thread Starter Rob Mahan

    (@robmahan)

    Hi @jenzgaard

    My tag management does not use IPTC keywords. As far as I can tell, WP only maps two IPTC fields upon upload:

    IPTC Headline field maps to WP Media Title
    IPTC Caption: (description) field maps to WP Media Caption

    I’ve uploaded test images with every IPTC field filled in and these seem to be the only two metadata fields that survive the upload. I also think that the metadata in these two fields survives when downloading the original size image from WP, but this metadata is stripped out of image sizes (thumbnail, medium, large) that are automatically generated upon upload to WP.

    For tag management in the WP Media Library, I’m using the plugin Enhanced Media Library PRO. The categories and tags I am generating and attaching to media in my library seem to be playing nicely with my FooGallery Expert PRO plugin. As far as I know, these categories and tags only exist in the WP Media Library and do not become part of the media files’ actual metadata.

    Hope this helps, or at least addresses your question!

    Rob

    Thanks Rob – actually many more IPTC fields survives the upload in the original file but WP just doesn’t show them. Why?

    Because, in the interim time – sorry for answering myself – I found the plugin ‘Media Library Assistant’ which maps all IPTC fields into existent and new wp fields. Maybe that is a better and more reliable solution for you as well. It also has shortcodes for dynamic display (not affiliated with them).

    This lets me set all image meta data prior to upload. Tagging should not be redundant. Tagging starts and belongs in my existent Lightroom workflow or whatever app.

    WP on the other hand should handle tags (and categories) much better in the future. Especially when alt, desc., caption is always highlighted as important. Why not use existent meta data and automatically inherit that. And Pages should have tags as well. But that is another matter… ??

    ~Jens

    • This reply was modified 2 years, 4 months ago by Brogaard.
    Thread Starter Rob Mahan

    (@robmahan)

    My turn to thank you, Jens! Very interesting that more IPTC fields survive the upload in the original file. I have the same question: Why doesn’t WP map them natively?

    I’m not using anything as sophisticated as Lightroom, but perhaps I should be, especially if pre-upload IPTC metadata can be mapped to WP media fields with a plugin. I will check out Media Library Assistant and see if I can improve my workflow.

    Thanks again for the heads up!

    -Rob

    Glad for the exchange. All the best.

    fullermetric

    (@fullermetric)

    I’m having a similar problem as the OP, but with my media files it is the EXIF metadata that is being used for the (media) post type attachment file’s -> title.

    I’m not sure when this WordPress Core change occurred, but I can tell you that I’ve seen forum posts where people want to use that information and supposedly WordPress Media uploads was stripping out that information.

    I just finished fixing about 240 media uploads where the person uploading the image didn’t notice this problem. I’m looking for information on how I can quickly fix the media title’s on another website of ours.

    For those wishing to learn more about this metadata see this link

    Thread Starter Rob Mahan

    (@robmahan)

    Hi @fullermetric

    I haven’t uploaded any JPEGs to my site for a few weeks, but I really hope any changes to WordPress Core (I just installed 6.1.1 today) haven’t broken my workarounds.

    Which EXIF tag’s value are you seeing populating the title of your uploaded media?

    I’m not using it yet, but perhaps the Media Library Assistant plugin may be some help for the situation you are dealing with.

    fullermetric

    (@fullermetric)

    Hello @robmahan

    In our case it was the EXIF header data that was used to populate the media title on upload. I did find a filter workaround from this stack exchange post.

    https://wordpress.stackexchange.com/questions/192762/media-upload-default-title-from-file-name

    Apparently this feature has been in wordpress core since version 2.5

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Default Media Title Not Consistent Upon Upload’ is closed to new replies.