[wp-trac] [WordPress Trac] #57821: Media library badly autopopulates image caption if Windows image metadata exists

WordPress Trac noreply at wordpress.org
Tue Feb 28 13:13:21 UTC 2023


#57821: Media library badly autopopulates image caption if Windows image metadata
exists
----------------------------------------------+----------------------------
 Reporter:  properlypurple                    |       Owner:  (none)
     Type:  defect (bug)                      |      Status:  new
 Priority:  normal                            |   Milestone:  Awaiting
                                              |  Review
Component:  Media                             |     Version:  6.1.1
 Severity:  normal                            |  Resolution:
 Keywords:  has-testing-info has-screenshots  |     Focuses:
                                              |  administration
----------------------------------------------+----------------------------

Comment (by properlypurple):

 === Some additional findings

 - The properties field stores an EXIF tag called XPComment
 - I tried with different system locales, and was able to reproduce with
 English(US), English(India), and English(UK)
 - I tried to use exiftool to add an XPcomment field to an image, which has
 never touched Windows, and that didn't show this bug
     exiftool -XPComment="some comment" 20221210_1352181.jpg
 - I found some documentation here about these tags (
 https://exiv2.org/tags.html)
 - I updated the XPcomment tag on my reference image with exiftool, but the
 bug was still reproduced.


 Output from the `file` command on both images attached to this ticket

     ❯ file buggy.jpg
     buggy.jpg: JPEG image data, Exif standard: [TIFF image data, big-
 endian, direntries=15, manufacturer=FUJIFILM, model=X-E2S, orientation
 =upper-left, xresolution=2270, yresolution=2278, resolutionunit=2,
 software=Photos 0.2.4, datetime=2017:01:07 21:28:38], baseline, precision
 8, 4896x3264, components 3

     ❯ file notbuggy.jpg
     notbuggy.jpg: JPEG image data, Exif standard: [TIFF image data,
 little-endian, direntries=13, manufacturer=FUJIFILM, model=X-E2S,
 orientation=upper-left, xresolution=186, yresolution=194,
 resolutionunit=2, software=Photos 0.2.4, datetime=2017:01:07 21:28:38],
 baseline, precision 8, 4896x3264, components 3


 This field is likely required to be encoded in a weird encoding called
 [UCS2](https://en.wikipedia.org/wiki/Universal_Coded_Character_Set), which
 is similar to UTF-16, but different.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57821#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list