The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Safari Mobile rotating pictures taken with phone's camera while in portrait mode

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #149371

    I have this annoying problem where Safari Mobile rotates the pictures I take with the phone camera. The weird thing is that it only happens while in portrait mode. Here’s a code sample:

    As you can see I’m adding the image as background of the preview div and setting the background-size property as cover so I can keep the image aspect ratio and fill the whole div area with the image. I also tried adding an image element as children of my div, but that didn’t worked either.

    Does anyone have any clue on what’s going on here?

    Ps.: I’m having this issue on iOS 6.0. Didn’t tried another iOS version.


    Turns out background-size: cover isn’t very stable over mobile devices (specially iOS). I didn’t wanted that but solved the issue by using JavaScript. There’s this plugin called Backstretch that I’ve ported to work with Zepto(which I’m using as a replacement for jQuery). Here’s a fully working example.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Other’ is closed to new topics and replies.