Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Treehouse Club: CSS My First Web Page Introduction to My First Web Page

Ari Westwood
Ari Westwood
1,511 Points

Picture uploads upside down or sideways.

When I upload a picture taken with an iPhone to the workspace, the picture will be uploaded flipped upside down or it will be flipped to landscape when it is originally vertical.

5 Answers

Robert Tyree
Robert Tyree
13,335 Points

No problem! This seems to be a relatively common problem. I've encountered it as well. Apple software will know how to interpret the photos to display them correctly, but the info in the photo file can be interpreted differently by non-Apple software such as a Chrome web browser.

To solve your problem, you might use a CSS rotate transform. Perhaps play around with something like this

img {
transform: rotate(90deg);
}

Alternately, you could just screen grab the image when it looks correct on your screen and upload the screen grab. :-)

Robert Tyree
Robert Tyree
13,335 Points

Pretty sure the photos contain data that indicate what orientation the camera was set to when the image was taken. I think that's included in the file's EXIF tags. Does the photo open correctly in Preview on your Mac? If not, you ought to be able to just rotate the photo in preview and then save the new orientation.

Good luck!

Ari Westwood
Ari Westwood
1,511 Points

Thanks for the quick answer Robert Tyree ! I figured it was something like that, but the problem is that it does open up correctly in preview and also in quick preview (Spacebar). Any other ideas??

Ari Westwood
Ari Westwood
1,511 Points

Sounds good! I will give it a shot. Thanks Again.

I had the same problem. I simply used another photo.