From Dev.to
Why your OCR sees ID photos sideways: EXIF orientation, and fixing it with Pillow
A phone held upright doesn't rotate the pixels it saves. It stores the image in the camera sensor's orientation, often landscape, and adds an EXIF Orientation tag (value 6, for example, means "rotate...
