diff --git a/backend/open_webui/routers/images.py b/backend/open_webui/routers/images.py index d3bc3f8eee..48209fc05c 100644 --- a/backend/open_webui/routers/images.py +++ b/backend/open_webui/routers/images.py @@ -641,7 +641,10 @@ async def image_generations( for image in res["data"]: if image_url := image.get("url", None): - image_data, content_type = get_image_data(image_url, headers) + image_data, content_type = get_image_data( + image_url, + {k: v for k, v in headers.items() if k != "Content-Type"}, + ) else: image_data, content_type = get_image_data(image["b64_json"]) @@ -993,7 +996,10 @@ async def image_edits( images = [] for image in res["data"]: if image_url := image.get("url", None): - image_data, content_type = get_image_data(image_url, headers) + image_data, content_type = get_image_data( + image_url, + {k: v for k, v in headers.items() if k != "Content-Type"}, + ) else: image_data, content_type = get_image_data(image["b64_json"])