ashleydw / lightbox

A lightbox gallery plugin for Bootstrap
http://ashleydw.github.io/lightbox
MIT License
1.85k stars 1.3k forks source link

Images Orientation Problems #205

Closed jplehmann closed 8 years ago

jplehmann commented 8 years ago

Web page: http://www.morphmarket.com/c/reptiles/pythons/ball-pythons/36079

Click on image to bring up ekko-lightbox, and notice the orientation is different. All other tools (browser, Facebook, and Mac Preview) render this image in portrait, but lightbox shows it in landscape. This happens on a number of images.

Verified on Chrome and Safari.

Raw image: https://morphmarket-media.s3.amazonaws.com/media/raw_images/repterra/2016/08/20160822143729-image.jpeg

ashleydw commented 8 years ago

Interesting, opening the image shows the correct orientation but inspector shows it landscape:

image

I think you're running into this: https://bugs.chromium.org/p/chromium/issues/detail?id=56845 http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/

see comment 66

As of webkit r132525, this is done when viewing image files directly. That change missed today's canary by 15 revisions, but it should be intomorrow's.

Images referenced from html files in elements are not affected, intentionally for web compat -- this might be addressed through an explicit opt-in via css as suggested by noel in comment 8, but that's not done at the moment.

jplehmann commented 8 years ago

The reason I believed it was a lightbox error is because, middle-click open image in new window (without lightbox) produces correct portrait orientation. Left-click opening the image in lightbox produces the (wrong) landscaped orientation.

However I understand from your links that the handling for this by the browser is very flaky and that this can be explained by its weirdness.

Thanks for the links.