After applying CIFilter, the UIImage is being rotated 90 degrees. I'm surprised this issue is still happening after so many years. Is there a swift version of these fixes:
Better Fix: iOS UIImagePickerController result image orientation after upload
Original Fix: Using CoreImage to filter an image results in image rotation