6

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: https://i.stack.imgur.com/CQyWs.jpg

But when I open in new tab it displays as portrait. https://i.stack.imgur.com/LrEBv.jpg

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?

jdotjdot
  • 16,134
  • 13
  • 66
  • 118
gkiely
  • 2,987
  • 1
  • 23
  • 37
  • Did you find a solution for this? – Lonergan6275 Aug 14 '17 at 10:07
  • More details here: https://stackoverflow.com/questions/42401203/chrome-image-exif-orienation-issue I'd also look into this to remove the exif data: https://www.npmjs.com/package/no-exif – gkiely Aug 15 '17 at 12:00

1 Answers1

2

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.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470