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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Anthony Scott](https://secure.gravatar.com/avatar/77e43f3f6325c80fe28d0dfabfd4d6ba?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Anthony Scott
Courses Plus Student 9,001 PointsJavascript causes images to load sideways
I have a very basic page in which I am trying to load a random pic from a set. Some of the images are displayed sideways for some reason. If I open the pics by themselves they are not sideways. Here is the codepen, couldn't upload the images, though: http://codepen.io/antkn33/pen/rymEwe Thanks Anthony
2 Answers
![Jordan Watson](https://uploads.teamtreehouse.com/production/profile-photos/2897242/micro_jordan_Main.jpg)
Jordan Watson
14,738 PointsI was looking at your code and it seems fine to me. My only suggestion is the CSS behind it other than that please see my code comments with the solution :)
![Anthony Scott](https://secure.gravatar.com/avatar/77e43f3f6325c80fe28d0dfabfd4d6ba?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Anthony Scott
Courses Plus Student 9,001 PointsThe stackoverflow link seems to do it. My pics were taken with an iPhone or iPad. When I stripped off all the metadata and manually re-orientated the pics, they came out fine. This seems like it would be a very common issue, I am surprised it isn't handled by the browser.