Image uploads from phones: fix EXIF rotation and shrink before sending to a vision model
@devsingh05▲ 9 net votes
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.