Potential corruption in image metadata when uploading to cloud



  • I haven't been able to pinpoint this as specifically caused by MediaCloud, but it started happening a few hours after I enabled MediaCloud with Direct Upload.
    See here for an example: https://wdwnt.com/wp-json/wp/v2/media/241972
    The media_details>image_meta
    seems to be getting corrupted with garbage/binary data.
    It doesn't happen with every upload, but it happens sporadically.
    If you look at media ids 241970-241976 which were all uploaded at the same time, two out of the seven have this issue. I looked in the wp_postmeta table and indeed the garbled data is there in the database, in a serialized field.
    I'm working with WPEngine to debug this, but it just seems like a super coincidence that this started happening the same day and just a few hours after I turned on MediaCloud.



  • @jasondiff

    With Direct Uploads, we need to extract EXIF metadata using a JS library, instead of using PHP's exif functions. I'm guessing the JS library is choking on the caption which is why you are getting the unicode junk.

    It doesn't really affect the media per se, just the caption data. If you can send me some of the images that are showing up with wrecked metadata, that will help me debug the JS lib. Please send the originals in a zip file so that the EXIF doesn't get stripped by any intermediaries. [email protected]


Log in to reply