3

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)?

  • I literally hit the same problem just now, and I found this page, which you might want to check out as a reference: daveperrett.com/articles/2012/07/28/… Unless P&T add some ninjaFu to handle this, I think the best option is to save their photos again. – Fred Carlsen Oct 15 '14 at 14:01
  • 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 Oct 15 '14 at 14:35
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.

| improve this answer | |
  • Any ideas on simple fixes to implement in the meantime? Or should I just have the client resave the images? – pstinnett Oct 16 '14 at 15:07
  • Either that or what @FredCarlsen mentioned in the OP comments... some sort of script that programatically does it. – Brad Bell Oct 16 '14 at 16:50
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! So this is in fact just a bug with new images found and indexed by the "Update Asset Indexes" tool.

| improve this answer | |
  • 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 Mar 22 '15 at 3:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.