<p>Running into an issue whereby front end asset uploads are not the correct orientation. I've spotted this mostly with user profile pics.</p>

<p>What's the best way to start debugging this?</p>

<p>My server has ImageMagick extension installed. I believe it's happening when a photo is being directly uploaded from a phone/mobile device. (The one time I managed to recreate it was a direct upload of an untouched photo from my iPhone.)</p>

<p>Any help appreciated. Thanks.</p>

CC BY-SA 3.0
2017-09-05T23:50:17.067Z
You get the same behavior for those images from the CP, I'd guess?  Any chance those images just don't have the orientation EXIF data set? https://craftcms.com/docs/config-settings#rotateImagesOnUploadByExifData
Brad Bell
CC BY-SA 3.0
2017-09-06T00:06:44.750Z
Same if I try uploading from the CP yes. Just tested with a photo taken directly on my  iPhone and it's shows rotated 90 deg. However, if I edit that photo on my phone beforehand (I cropped it) then upload it, the orientation is correct. ??
shorn
CC BY-SA 3.0
2017-09-06T16:48:24.107Z
I ran into this same issue with a project for a client a couple years ago, and I'm almost certain @BradBell second recommendation about EXIF orientation data is correct.  Try following the suggestion in the link Brad gave and set `rotateImagesOnUploadByExifData` to true in your general.php config file.
blendenzo
CC BY-SA 3.0
2017-09-06T17:20:05.190Z
Ok, I'll add it in and see if it makes a difference. It's `true` by default though isn't it?
shorn
CC BY-SA 3.0
2017-09-07T22:02:13.540Z
Just managed to test this, added the `rotateImagesOnUploadByExifData ` setting to my config and... still not working :(
shorn
CC BY-SA 3.0
2017-10-24T10:39:45.990Z
Did you ever find a solution to this? I'm having the same issue and I've added the suggested `rotateImagesOnUploadByExifData` config setting and tried setting it to both `true` and `false` and neither has had any effect :(
Steve Holland
CC BY-SA 3.0
2017-10-24T10:40:55.173Z
Nope, unfortunately not! :(
shorn
CC BY-SA 3.0
2017-10-24T12:46:06.740Z
No worries, thanks for getting back to me :)
Steve Holland
CC BY-SA 3.0
2017-10-24T15:48:24.960Z
It's probably going to be zero help to you, as you've mentioned you already have it, but I didn't have ImageMagick installed. We got it installed and that's fixed the issue for us. We haven't got the `rotateImagesOnUploadByExifData` setting in the config anymore either. Maybe worth double checking ImageMagick is up to date on your server and definitely being used by Craft?
Steve Holland
<assets><upload>
Front end asset uploads not correctly rotated
# Front end asset uploads not correctly rotated

(Asked by: username_0 on 2017-09-05)

Running into an issue whereby front end asset uploads are not the correct orientation. I've spotted this mostly with user profile pics.

What's the best way to start debugging this?

My server has ImageMagick extension installed. I believe it's happening when a photo is being directly uploaded from a phone/mobile device. (The one time I managed to recreate it was a direct upload of an untouched photo from my iPhone.)

Any help appreciated. Thanks.

**Tags:** assets, upload

> **Comments:**
> **username_1**: You get the same behavior for those images from the CP, I'd guess?  Any chance those images just don't have the orientation EXIF data set? https://craftcms.com/docs/config-settings#rotateImagesOnUploadByExifData  
> **username_0**: Same if I try uploading from the CP yes. Just tested with a photo taken directly on my  iPhone and it's shows rotated 90 deg. However, if I edit that photo on my phone beforehand (I cropped it) then upload it, the orientation is correct. ??  
> **username_2**: I ran into this same issue with a project for a client a couple years ago, and I'm almost certain @BradBell second recommendation about EXIF orientation data is correct.  Try following the suggestion in the link Brad gave and set `rotateImagesOnUploadByExifData` to true in your general.php config file.  
> **username_0**: Ok, I'll add it in and see if it makes a difference. It's `true` by default though isn't it?  
> **username_0**: Just managed to test this, added the `rotateImagesOnUploadByExifData ` setting to my config and... still not working :(  
> **username_3**: Did you ever find a solution to this? I'm having the same issue and I've added the suggested `rotateImagesOnUploadByExifData` config setting and tried setting it to both `true` and `false` and neither has had any effect :(  
> **username_0**: Nope, unfortunately not! :(  
> **username_3**: No worries, thanks for getting back to me :)  
> **username_3**: It's probably going to be zero help to you, as you've mentioned you already have it, but I didn't have ImageMagick installed. We got it installed and that's fixed the issue for us. We haven't got the `rotateImagesOnUploadByExifData` setting in the config anymore either. Maybe worth double checking ImageMagick is up to date on your server and definitely being used by Craft?  

---

## 0 answers

