Sorry for the wallpaper format. I couldn’t find my original shot.
The rotation is saved in the photo’s metadata. Lemmy removes the metadata from posted pictures pics use it can provide a time and gps location of the picture as well, so the rotation information is gone.
You can save the correctly rotated version as a new picture in any editing software and it will save/post correctly.
Edit: I had no idea you could edit/repost pics already posted! That’s great to know :)