<p>The image processing library we use just recently added the support for us to be able to read image EXIF metadata from images, so it's on our list (among other things) to have transforms be aware of image orientation.</p>

CC BY-SA 3.0
2014-10-16T15:07:18.633Z
Any ideas on simple fixes to implement in the meantime? Or should I just have the client resave the images?
pstinnett
CC BY-SA 3.0
2014-10-16T16:50:26.373Z
Either that or what @FredCarlsen mentioned in the OP comments... some sort of script that programatically does it.
Brad Bell
CC BY-SA 3.0
2014-10-15T17:26:49.850Z
2014-10-15T17:26:49.850Z
Brad Bell
<p>I noticed that this is only a problem for images directly indexed using the "Update Asset Indexes" tool. If you upload images with the browser, Craft seems to recognise the orientation and apply it to transforms.</p>

<p><s>Not sure if this got actually fixed / implemented and it is a bug with the tool?</s></p>

<p><strong>Edit:</strong> I just found out that Craft does in fact rotate the images before transforming them, there's even a config setting for it <a href="http://buildwithcraft.com/docs/config-settings#rotateImagesOnUploadByExifData" rel="nofollow">rotateImagesOnUploadByExifData</a>! So this is in fact just a bug with new images found and indexed by the "Update Asset Indexes" tool.</p>

CC BY-SA 3.0
2015-03-22T03:40:31.790Z
Yeah, `rotateImagesOnuploadByExifData` was added after that answer, but  it looks like there might be a bug with the update asset indexes tool.  Will look into it.
Brad Bell
CC BY-SA 3.0
2015-03-21T12:12:49.997Z
2015-03-21T14:45:19.533Z
2015-03-21T14:45:19.533Z
carlcs
<p>I have a CraftCMS site and a client has uploaded some images to their portfolio that were taken with their iPhone. Generally I don't worry about the EXIF data/camera orientation but it looks like the transforms are ignoring it. </p>

<p>Looking in Chrome - you can see the issue on this page: <a href="http://seachant.co/work/levis-x-vsco" rel="nofollow">http://seachant.co/work/levis-x-vsco</a></p>

<p>Wondering if anyone else has dealt with this or if there is a quick fix for this in Craft (without having the client save out their photos again)?</p>

CC BY-SA 3.0
2014-10-15T14:01:20.010Z
I literally hit the same problem just now, and I found this page, which you might want to check out as a reference: http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/ Unless P&T add some ninjaFu to handle this, I think the best option is to save their photos again.
Fred Carlsen
CC BY-SA 3.0
2014-10-15T14:35:50.873Z
Actually, thinking about it, you can alternatively make a bash script that uses exiftool, loops over every file, and fixes/remove the Orientation attribute.
Fred Carlsen
<assets><image-transforms>
Camera Orientation and image transforms?
# Camera Orientation and image transforms?

(Asked by: username_0 on 2014-10-15)

I have a CraftCMS site and a client has uploaded some images to their portfolio that were taken with their iPhone. Generally I don't worry about the EXIF data/camera orientation but it looks like the transforms are ignoring it.

Looking in Chrome - you can see the issue on this page: <http://seachant.co/work/levis-x-vsco>

Wondering if anyone else has dealt with this or if there is a quick fix for this in Craft (without having the client save out their photos again)?

**Tags:** assets, image-transforms
> **Comments:**
> **username_1**: I literally hit the same problem just now, and I found this page, which you might want to check out as a reference: http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/ Unless P&T add some ninjaFu to handle this, I think the best option is to save their photos again.  
> **username_1**: Actually, thinking about it, you can alternatively make a bash script that uses exiftool, loops over every file, and fixes/remove the Orientation attribute.  

---

## 2 answers

### Answer by username_2 on 2014-10-15. Score: 2

The image processing library we use just recently added the support for us to be able to read image EXIF metadata from images, so it's on our list (among other things) to have transforms be aware of image orientation.

> **Comments:**
> **username_0**: Any ideas on simple fixes to implement in the meantime? Or should I just have the client resave the images?  
> **username_2**: Either that or what @FredCarlsen mentioned in the OP comments... some sort of script that programatically does it.  

---

### Answer by username_3 on 2015-03-21. Score: 1

I noticed that this is only a problem for images directly indexed using the "Update Asset Indexes" tool. If you upload images with the browser, Craft seems to recognise the orientation and apply it to transforms.

~~Not sure if this got actually fixed / implemented and it is a bug with the tool?~~

**Edit:** I just found out that Craft does in fact rotate the images before transforming them, there's even a config setting for it [rotateImagesOnUploadByExifData](http://buildwithcraft.com/docs/config-settings#rotateImagesOnUploadByExifData)! So this is in fact just a bug with new images found and indexed by the "Update Asset Indexes" tool.

> **Comments:**
> **username_2**: Yeah, `rotateImagesOnuploadByExifData` was added after that answer, but  it looks like there might be a bug with the update asset indexes tool.  Will look into it.  

---

