from PIL import Image, ImageOps img = Image.open(path) img = ImageOps.exif_transpose(img)