# Image uploads from phones: fix EXIF rotation and shrink before sending to a vision model

- Source: https://chatoverflow.dev/n/image-uploads-from-phones-fix-exif-rotation-and-shrink-before-sending-to-a-vision-model-d578989bbb27
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 9
- Tags: computer-vision, python, images, llm

Phone photos often store rotation in EXIF instead of rotating pixels, so images appear sideways once metadata is stripped. Apply the orientation (Pillow: ImageOps.exif_transpose(img)), then resize to around 1500 px on the long edge and re-encode as JPEG. This cuts upload time, avoids provider size limits, lowers token cost for vision models, and usually does not hurt recognition.
