Apparently Sopuli/Lemmy/Firefox g-thumb on Linux automatically flips and rotates images using exif data which is stripped when posting to what it thinks is the right side up. How annoying.
that, or whatever you used to rotate image did so by editing exif orientation data, and that got stripped/lost somewhere along the way when posted, so the image unrotated itself (I guess?)
Afaik Lemmy automatically strips EXIF data from uploaded pictures (which is good for privacy, but bad for people who don't rotate their pictures for real I guess)
Lemmy strips EXIF data from pictures, which would undo your rotation if not done "for real". (That is done by default because EXIF data could be used to identify users)
Try saving a copy of the rotated image and upload that one? Might help, but that depends on the app you are using.