Answers.Body: <p>After some mail exchanges with Brad and Andris from Craft CMS, it turned out that there is an edge case where the image rotation on upload will not work if the EXIF extension is not installed (which was our case).</p>
  
  <p>There are two solutions to fix this problem:</p>
  
  <ol>
  <li>Install EXIF extension</li>
  <li>Install and use Imagick instead of GD.</li>
  </ol>
  
  <p>As Imagick is the recommended image extension for Craft, we ended up installing Imagick on the server.</p>
  
  <p>This is already working with Imagick on Craft 3, and will soon be working on Craft 2 with the next update (> v2.6.2954).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-21T14:24:06.017Z
Answers.LastActivityDate: 2016-12-21T14:24:06.017Z
Answers.UserDisplayName: kant312
Body: <p>The Craft CMS instance where I noticed this is running version 2.6, but I updated it last month from version 2.2.</p>
  
  <p>While we did not notice any problem, according to the client, they were able to upload pictures taken with their smartphone and Craft would rotate the images correctly before the update.</p>
  
  <p>As far as I can tell, Imagick is not available on this server (I checked PHPInfo) so GD has always been used. I also made sure that the "rotateImagesOnuploadByExifData" setting is set to true by adding it explicitly to the general config.</p>
  
  <p>Any idea what could be causing the issue and would installing Imagick solve the problem?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-29T19:08:00.633Z
Comments.Text: Any chance the client was mistaken? :)
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-30T08:14:22.523Z
Comments.Text: We definitely cannot rule that out ;) Still, even if there was no problem before, the pictures are not rotated now :[
Comments.UserDisplayName: kant312
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-30T21:56:19.957Z
Comments.Text: Fair enough... can you send one of the images over to support@craftcms.com and reference this thread so we can try to reproduce?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-12-10T13:51:36.533Z
Comments.Text: For anyone else looking at this, I had a similar problem and the cause was I have the imageresizer plugin installed and it was resizing the image and stripping the exif data before Craft got to check the exif data.
Comments.UserDisplayName: Paul Frost
Tags: <image><upload><imagick>
Title: Images containing EXIF orientation tag are not rotated on upload
ThreadText: # Images containing EXIF orientation tag are not rotated on upload
  
  (Asked by: username_0 on 2016-11-29)
  
  The Craft CMS instance where I noticed this is running version 2.6, but I updated it last month from version 2.2.
  
  While we did not notice any problem, according to the client, they were able to upload pictures taken with their smartphone and Craft would rotate the images correctly before the update.
  
  As far as I can tell, Imagick is not available on this server (I checked PHPInfo) so GD has always been used. I also made sure that the "rotateImagesOnuploadByExifData" setting is set to true by adding it explicitly to the general config.
  
  Any idea what could be causing the issue and would installing Imagick solve the problem?
  
  **Tags:** image, upload, imagick
  
  > **Comments:**
  > **username_1**: Any chance the client was mistaken? :)  
  > **username_0**: We definitely cannot rule that out ;) Still, even if there was no problem before, the pictures are not rotated now :[  
  > **username_1**: Fair enough... can you send one of the images over to support@craftcms.com and reference this thread so we can try to reproduce?  
  > **username_2**: For anyone else looking at this, I had a similar problem and the cause was I have the imageresizer plugin installed and it was resizing the image and stripping the exif data before Craft got to check the exif data.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-12-21. Score: 5 | Accepted answer
  
  After some mail exchanges with username_1 and Andris from Craft CMS, it turned out that there is an edge case where the image rotation on upload will not work if the EXIF extension is not installed (which was our case).
  
  There are two solutions to fix this problem:
  
  1. Install EXIF extension
  2. Install and use Imagick instead of GD.
  
  As Imagick is the recommended image extension for Craft, we ended up installing Imagick on the server.
  
  This is already working with Imagick on Craft 3, and will soon be working on Craft 2 with the next update (> v2.6.2954).
  
  
  ---
  
  