Why a 'correct' photo looks sideways elsewhere
When you hold your phone sideways to shoot a landscape photo, the camera sensor actually records the image lying on its side — but the phone quietly writes a small piece of metadata, called an EXIF orientation flag, telling any software that reads it 'display this rotated 90°.' Your phone's gallery reads that flag correctly and shows the photo upright. Plenty of other software — some websites, some older programs, some upload validators — ignores it, and shows the raw, sideways pixels instead.
Why this is different from a normal rotation problem
It's not that the photo is actually sideways — the pixel data and the metadata disagree about which way is up, and different programs resolve that disagreement differently. That's why the same file can look perfectly upright in one app and sideways in another, which is genuinely confusing the first time it happens.
The permanent fix
The reliable solution is rotating the image so the pixels themselves match the intended orientation, rather than relying on any program to read and respect the EXIF flag. Once the pixels are physically rotated, the file displays correctly everywhere — the website that was ignoring the flag, the old program, the upload form — because there's no metadata left to misinterpret.
A quick way to check which way it's off
Open the file somewhere that ignores EXIF orientation — many browsers do this when you drag an image directly into a new tab. If it displays sideways there, that confirms it's an orientation-flag issue rather than an actual problem with the photo, and rotating it to match will fix it everywhere, permanently.