Image rotation issue

5 posts by 5 authors in: Forums > CMS Builder
Last Post: September 19, 2014   (RSS)

By zip222 - September 16, 2014

I am experiencing ab issue with a blog I recently setup for a client. With each blog post, the users can upload photos using the standard "upload" field. The issue is that many, but not all, of the vertically-oriented images are not being displayed in the correctly rotated format after upload. The photos come from several different users and different cameras. Anyone experienced this before and have any suggested work-arounds?

By Toledoh - September 17, 2014

I was looking into this some time ago - but didn't get very far...  It's because the phone taking the images is held vertically at times and horizontally at others.

In each jpg image, there is EXIF headers, which are meant to identify whether the photo is portrait or landscape etc.  Maybe this can help: http://php.net/manual/en/function.exif-read-data.php

Cheers,

Tim (toledoh.com.au)

By claire - September 18, 2014

We had to handle something like this for a project, and if I recall right the only real solution was to strip the EXIF data and give the user the option to rotate the image before it was saved.

The biggest issues we had were with iOS. Apparently Apple has some odd way of dealing with EXIF, go figure. If this turns out to work well on mobile devices, do let us know.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Codee - September 19, 2014

Have you considered, or looked into, using Image Magick as a 3rd party solution that works ON the server after upload?  Years ago some great programmers at a company I was working with found that Image Magick was a fantastic solution that worked for their vehicle classifieds site that was essentially error-free.  Here's a SourceForge link to it (but lots of information and links can be found via Googling):

http://sourceforge.net/projects/imagemagick/

Good luck!