Handle member photo Exif data orientation in the API
This commit is contained in:
parent
49b2cb48ab
commit
04e0bbc7a2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user