Handle member photo Exif data orientation in the API

This commit is contained in:
Tanner Collin 2020-07-18 06:12:37 +00:00
parent 49b2cb48ab
commit 04e0bbc7a2

View File

@ -185,6 +185,8 @@ def process_image_upload(upload, crop):
else:
raise serializers.ValidationError('Image must be a jpg or png.')
pic = ImageOps.exif_transpose(pic)
if crop:
crop = json.loads(crop)
pic_x, pic_y = pic.size