Metadata inconsistency problem
-
Hi,
First things first, thanks a lot for this incredibly useful plugin. Nice idea.
I have noticed a small inconsistency in metadata replacement : if the new file has both its title (ObjectName tag) and its caption (ImageDescription tag) changed, only the title is updated (I’m using the second upload option), not the caption.
Best regards.
Patrick
-
Hi, Patrick!
Thank you for your message.
I’m not sure I understand the issue 100%. Could you please tell me step by step how to reproduce it from my side?
Thank you!
Hi Gerard,
Steps to reproduce :
1. Pick up an image having the title field set to, say, Title 1 and the Caption field set to Caption 1 and upload this image to the media library. You can see the value of these fields when opening the image in the media library.
2. Go back to you your original image and use a metadata editor to change the title to Title 2 and the caption to Caption 2.
3. Use the replace command to upload again the image using the second upload option, not the “File only” option.
4. Open again the image in the media library. The title is now set to Title 2 and the caption is still set Caption 1.
Note that in metadata editors the real tag name of Title is ObjectName and the real tag name of Caption is ImageDescription.
Hope this helps.
Patrick
- This reply was modified 3 years, 7 months ago by samoreen.
Thank you, Patrick.
Can you tell me please how to set the Caption field before uploading the image? I can see how to edit the Title field, but not the Caption.
Thank you!
Hi Gerard,
Can you tell me please how to set the Caption field before uploading the image?
Probably the same way as you get and set the Title. To get it, just use $image_meta[‘caption’] instead of $image_meta[‘title’].
To set it, use $update_ar[‘post_excerpt’] = $caption; instead of $update_ar[‘post_title’] = $title; .
Just a guess.
Patrick
All right, Patrick.
Thank you. We’ll add this to our list to check and let you know if we have any questions.
Thanks for letting us know!
Dear Patrick,
I’m part of the dev team at ShortPixel and I’m trying to make sure I correctly understand your request here. I did follow your steps, when replacing the image I chose the second option “Replace the file, use the new file name and update all links” and kept the same date of the image (option on the right side of the replace screen). After the replacement was done, the image title (the one that shows on top of the image in the edit image screen) was the one taken from the new image (which I’d say is the expected behavior), while the Caption field remained at the expected “Caption 2”.
Maybe it would help us understand better the issue if you added some screen shots?
Many thanks,
PedroHi Pedro,
I repeated the test described above and I obtained the same result.
1. Original image was uploaded to the media library. Title was “House 1” and caption was “Caption 1”. The media library reflected this.
2. I changed the metadata in the file and replace the title with “House 2” and the caption with “Caption 2”.
3. I replaced the original file (options can be seen in the screen capture)
4. In the media library, the title of the new image was “House 2” as expected but the caption was still “Caption 1” which is not correct.
You can see the screen captures here :
https://www.dropbox.com/sh/t0r9ddaok03z44b/AAAGU_-X9DbzptVXI_Y3XVBSa?dl=0
I’m sure you’ll obtain the same results if you do the same test.
Patrick
Hi @samoreen and thanks for providing all the details.
I might have not understood correctly some parts, so my apologies for that. Just to double confirm: the caption and the title are stored as metadata inside the image file itself and not into WordPress? If yes, is this inside the EXIF data, or somewhere else?
If yes, can you please:
– add to the same Dropbox link the actual files (with the 2 sets of metadata)?
– tell me which tool have you used to alter the metadata inside the image file?
– tell me if you upload the second file (with Title 2/Caption 2 in metadata) directly into WordPress, does it import the correct metadata upon upload?I want to ensure that I’m using exactly the same tools and files, in order to reproduce (and hopefully fix) the issue.
Many thanks,
PedroHi Pedro,
The original files have been uploaded to the same folder that was mentioned above.
>Just to double confirm: the caption and the title are stored as metadata inside the image file itself
Of course. Since I’m replacing an image file with another file, if the metadata must be changed, this can only occur in the file itself (or in a companion file – like a XMP file – but WP doesn’t care about these).
> tell me which tool have you used to alter the metadata inside the image file?
The metadata have been generated and modified in Lightroom but this doesn’t matter. Any metadata editor will do.
The caption is stored in the EXIF “Description” field, the XMP “Description” field and in the IPTC “Caption” field.
The title is stored in the IPTC “ObjectName” field and the XMP “Title” field.
> tell me if you upload the second file (with Title 2/Caption 2 in metadata) directly into WordPress, does it import the correct metadata upon upload?
Good question. Yes, if the House2 file is uploaded directly (not replacing anything, the caption is correct (Caption 2). Not a surprise. Both files are strictly identical. Only the Title and Caption have been modified outside of WP. So, as reported initially, the problem is that the replacement process disregards the caption and only handles the title.
Thanks.
Patrick
Dear Patrick,
Many thanks for providing all the details, the issue is pretty clear now.
I initially wrongly assumed that you are editing the metadata directly from WordPress, hence the confusion.
We’ll look into that and hopefully fix it in the next release, which is probably coming out next month.
Thanks again for the detailed report and patience with describing the issue.
Dear Patrick,
Can you please check this situation with this version of the plugin and let me know if it works as you’d expect it to work?
https://shortpixel.com/downloads/enable-media-replace-3.6.0-BETA01.zip
Thanks, I look forward to getting your confirmation about this!
PedroDear Patrick, I marked this as resolved, as according to our tests, the issue is resolved by the 3.6.0 release.
Please get back on this topic if the issue is still present, or open a new one if you have any other issues.
Thank you!
Hi Pedro,
I guess you received my answer. Yes, the problem was fixed with the beta version.
Thanks again.
Patrick
- The topic ‘Metadata inconsistency problem’ is closed to new replies.