django-resized icon indicating copy to clipboard operation
django-resized copied to clipboard

JPEG images taken with iPhone after resize are rotated.

Open Bohooslav opened this issue 3 years ago • 10 comments

There are some JPEG images taken with iPhone that after I upload them in the Django admin they got rotated after resizing. I force JPEG format. Maybe because the rotation metadata isn't saved?

My model

image = ResizedImageField('Головне фото', size=[1024, 1024], upload_to='images')

My settings

DJANGORESIZED_DEFAULT_SIZE = [1920, 1080]
DJANGORESIZED_DEFAULT_QUALITY = 75
DJANGORESIZED_DEFAULT_KEEP_META = True
DJANGORESIZED_DEFAULT_FORCE_FORMAT = 'JPEG'
DJANGORESIZED_DEFAULT_FORMAT_EXTENSIONS = {'JPEG': ".jpg"}
DJANGORESIZED_DEFAULT_NORMALIZE_ROTATION = True

The photo for example I have attached.

IMG_2325

After upload the photo got rotated(90deg). Here is what happened to it. image

Bohooslav avatar Jan 21 '21 10:01 Bohooslav