Why do some pictures I post get rotated? - eviltoast

I have seen several of my image posts (and several other posters pictures) become turned sideways after posting even though the image is right side up before posting. How do I ensure my image won’t get rotated once posted?

  • Drewfro66@lemmygrad.ml
    link
    fedilink
    English
    arrow-up
    17
    ·
    1 year ago

    When you rotate an image in your phone or on your computer (by right-clicking or going into the image options and selecting “Rotate Right” or w/e), the device is not editing the image to rotate it 90 degrees. It’s just adding a little metadata tag that tells devices loading the image “display this, but rotate it 90 degrees”.

    Lemmy scrapes off metadata as a privacy concern, since this also holds personal and location data. There have been a few medium-profile events of internet stalkers getting location data off of women’s selfies and going straight to their homes.

    I’m not sure if there’s a simpler solution, but opening the image in an image editor and saving it again should remove the metadata tag and save it as an actual, upright image. However, this is a problem that the devs should fix - platforms like Discord also shave off metadata, but know enough to leave the orientation data intact.

    • _HR_@lemmy.world
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 year ago

      When you rotate an image in your phone or on your computer (by right-clicking or going into the image options and selecting “Rotate Right” or w/e), the device is not editing the image to rotate it 90 degrees. It’s just adding a little metadata tag that tells devices loading the image “display this, but rotate it 90 degrees”.

      That depends on the software you’re using. Some edit metadata, some rotate the image itself.

  • cnhguy@programming.dev
    link
    fedilink
    arrow-up
    11
    ·
    1 year ago

    Someone else mentioned in a different post that lemmy removes the metadata from photos as a privacy feature, which might be causing this

    • Mirodir@lemmy.fmhy.ml
      link
      fedilink
      arrow-up
      5
      ·
      1 year ago

      That’s gotta be it. You can tell images to be displayed rotated instead of actually rotating them through metadata (EXIF flags). That’s for example also how Windows does (or at least did) rotate images when you clicked on the 90° rotation button.

      I remember having issues with this before when later loading those images through some code.