Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Jord5i

macrumors member
Original poster
Jul 15, 2012
95
0
Hello all,

I'm working on a auctioning site, where sellers can post an auction through the website. When they try to upload a photo from their iphone, the images don't always show correctly.

Photo's shot in portrait mode are 90 degrees to the left, photos made in landscape (volume buttons up) are upside down.
The only photos going correctly are those shot in landscape, with the volume buttons down.

I prefer not having to ask the users to make all their photos in upside down landscape. Is there a way to make sure the upload goes correctly?
 
Photo orientation depends on how the users held the phone (or camera) when they took the photo and there's nothing you can do about user behavior.

However, correcting the photo orientation shouldn't be too hard to implement serverside, especially as you said "iPhone".

In short, most cameras save inside the picture file additional info (EXIF) like the camera model, settings, location and also the camera orientation when the photo was taken so it's just a question of reading this info in order to determine the correct position.
Coming back to your problem, iPhone adds EXIF info to all pictures so it's perfectly doable.

You can find a PHP implementation here:

http://stackoverflow.com/questions/...and-auto-rotate-for-website-display-like-desk

If you need help with a custom implementation for your website, fell free to throw me a PM. :cool:
 
Last edited:
Funny, iPhone upload works perfectly on Facebook, Twitter, ebay, and many other sites. Perhaps your site has a problem?

It's probably not reading the orientation code. In that case fix the code or add a module to allow people to rotate photos.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.