Do not presume "xmp" info simply because "XML:com.adobe.xmp" info exists by radarhere · Pull Request #8173 · python-pillow/Pillow
#8069 changed ImageOps.exif_transpose() so that when updating a PNG image's im.info["XML:com.adobe.xmp"], it would update the newly added im.info["xmp"] as well.
However, #8171 (comment) has pointed out that our code shouldn't presume that the user didn't manually set im.info["XML:com.adobe.xmp"] themselves, in which case im.info["xmp"] might be absent.