Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon S3 Flipping portrait image in browser?

I have an image hosted on s3, that is being flipped form portrait to landscape when placed inside an image tag.

Chrome shows it as horizontal in the page: http://imgur.com/kJNzNQG,PgJPUsm#0

But when I open in new tab it displays as portrait. http://imgur.com/kJNzNQG,PgJPUsm#1

Results:

  • wget: returns a vertical image.
  • All Browsers inside image tag: horizontal
  • Chrome, safari, FF in new tab: vertical
  • IE new tab: horizontal

I cannot directly link to the image as they are photos of users.

Has anyone encountered this before?

like image 967
gkiely Avatar asked Nov 20 '14 21:11

gkiely


1 Answers

Your camera might have inserted an EXIF orientation flag into your picture, which is being interpreted by the browser.

Based on your results, the browsers (other than IE) rotate the picture if it is displayed on its own tab, but do not rotate if it is displayed within a page.

like image 77
John Rotenstein Avatar answered Oct 19 '22 21:10

John Rotenstein