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:
|
else:
|
||||||
raise serializers.ValidationError('Image must be a jpg or png.')
|
raise serializers.ValidationError('Image must be a jpg or png.')
|
||||||
|
|
||||||
|
pic = ImageOps.exif_transpose(pic)
|
||||||
|
|
||||||
if crop:
|
if crop:
|
||||||
crop = json.loads(crop)
|
crop = json.loads(crop)
|
||||||
pic_x, pic_y = pic.size
|
pic_x, pic_y = pic.size
|
||||||
|
|
Loading…
Reference in New Issue
Block a user