iOS 13 didFinishPickingMediaWithInfo returns a rotated UIImage from camera

When taking a photo in my app using the camera source, didFinishPickingMediaWithInfo will return a UIImage that is rotated. But only if the image was captured in portrait orientation. Landscape images come out perfect.


This is a new behaviour as it worked just fine in iOS 12 and prior.


The UIImage's imageOrientation comes out as UIImageOrientationRight


If I first save the image into the Photo Library and then select the image, then didFinishPickingMediaWithInfo returns the correctly oriented portrait image.


Why would there be a discrepancy like this and how do I overcome it?


Is this just the new behaviour of iOS 13 or is this a bug?

Replies

Did you ever figure out a solution to this problem?


I have the same issue.