you need the set output.connection(with: .video)?.videoOrientation before capture image
if let orientation = AVCaptureVideoOrientation(rawValue: UIDevice.current.orientation.rawValue) {
camera.output.connection(with: .video)?.videoOrientation = orientation
}
Topic:
Media Technologies
SubTopic:
General
Tags: