diff --git a/backend/routers/items.py b/backend/routers/items.py index 3d269230..ff38c3a7 100644 --- a/backend/routers/items.py +++ b/backend/routers/items.py @@ -161,6 +161,10 @@ def create_item( image_bytes = base64.b64decode(item.extracted_image_bytes) log.info(f"[CREATE_ITEM] Received {len(image_bytes)} bytes for photo processing (base64 decoded)") + # Strip EXIF orientation to match what Gemini analyzed + image_bytes = strip_exif_orientation(image_bytes) + log.info(f"[CREATE_ITEM] After EXIF strip: {len(image_bytes)} bytes") + photo_result = _auto_save_photo_from_extraction( item_id=db_item.id, image_bytes=image_bytes,