Why a JPEG turns sideways after upload
The photo looks upright on your phone but sideways in a form. Two arrow images show how to diagnose and fix the rotation.
Open the full-size uploaded image before turning anything. A website may build its thumbnail separately, so a sideways preview doesn't necessarily tell you what the recipient will see.
Which way is up?
Our JPEG stores a 480 × 320 grid of pixels. EXIF Orientation 6 tells a viewer to rotate it 90° clockwise for display. Ignore that instruction, or strip it before rotating the pixels, and the arrow points left.

Make a copy for the form
- Keep the original. Export a new JPEG from an editor that honours orientation. If the preview is already upright, leave it there. Rotate it once if it is still sideways.
- Check the copy. In our example it should be 320 pixels wide and 480 high, with no rotation needed for display.
- ImageMagick can apply the stored orientation before saving. If the tag has already gone, choose the direction yourself.
magick sideways.jpg -auto-orient -quality 92 upright.jpgCheck the uploaded copy
Upload the copy under a fresh name, then reopen the full image. If only the thumbnail cuts off a forehead or the edge of a document, inspect its crop before resizing the original.
Our files measured 15,864 and 13,165 bytes after JPEG export. For a 200 KB limit, rotate and compress in one export from the original.