An image that looks right on the desktop can appear rotated after upload, because the rotation is stored as metadata rather than applied to the pixels. MDN documents the image-orientation CSS property, whose default value from-image uses the EXIF data to rotate the image appropriately, and notes that the property is intended to correct orientation from how the image was shot or scanned. Check the orientation metadata before upload, and confirm the image displays the right way up on the target site.
What you need
- The AI-generated image file
- A viewer that shows the image as the site will show it
- The target site upload page, if available
Step 1: Open the image in a plain viewer
Open the image in a viewer that respects orientation metadata, and note whether it appears the right way up. Then open it in a viewer that ignores the metadata, and compare.
Step 2: Check the orientation metadata value
Read the image metadata and note the orientation value. If the value says the image is rotated, the file relies on the viewer to correct it.
Step 3: Re-save the image with the rotation applied
If the metadata rotation is the only thing keeping the image upright, re-save the image with the rotation applied to the pixels and the metadata reset. Upload the re-saved file and check it on the site.
Worked example: synthetic orientation check of one image
The table below is a synthetic example. It shows the expected result of checking one image before upload; no image was uploaded.
| Viewer | Image appears | Verdict |
|---|---|---|
| Desktop viewer | Upright | Pass |
| Browser preview | Upright | Pass |
| Site upload preview | Sideways | Fail – metadata |
| After re-save | Upright everywhere | Pass |
Expected result (UNTESTED). the image is upright in two viewers but sideways in the site preview, because the rotation lives in the metadata, so the image must be re-saved with the rotation applied. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- Some sites strip metadata on upload, so an image that relies on metadata rotation can appear sideways after upload.
- Re-saving an image can recompress it, so check the quality after the re-save.
- A square image has no orientation problem, so this check matters most for portrait and landscape images.
- The metadata value alone does not prove the image will display correctly; check the actual site preview.
