Why does my photo upload sideways? The rotation lives in a tag, and stripping metadata throws it away
We stored a photo on its side with the EXIF tag Orientation 6 and opened it in Chrome 156. It stood upright. Then exiftool -all= removed the metadata, and the photo lay on its side. So did the copies saved by magick -strip and jpegtran -copy none. That is how a photo can look right on your phone and arrive sideways on a website. The file holds the pixels the way the camera sensor wrote them, plus a tag that tells a viewer how to turn them. A site that ignores the tag, or software in its pipeline that drops it, shows the pixels as stored. The fix is to turn the pixels themselves so no tag is needed, and the steps are below. Removing metadata doesn't do that.