open-webui/backend/open_webui/routers
Classic298 0a2e9a42e7
fix: detect the real image type of bare base64 generated images (#30359)
Generated images that come back as bare base64 (OpenAI b64_json, Gemini
bytesBase64Encoded and inlineData, Automatic1111) were always stored as
generated-image.png with content type image/png, even when the provider
returned JPEG or WebP, for example with {"output_format": "jpeg"} in the
OpenAI extra params. The image still rendered because browsers read the
bytes, but the download name, the served Content-Type and the type sent
along on a later image edit were wrong.

Bare base64 carries no format, so the type is now read from the bytes with
Pillow, the same way the file already inspects images elsewhere. A response
that is not an image at all now fails the generation instead of storing a
broken png. The file extension comes from the module's own extension map
first, because the Python 3.11 Docker image has no mime database entry for
WebP and would otherwise name the file generated-imageNone.

Fixes #29948
2026-09-22 11:35:59 -04:00
..
analytics.py refac 2026-06-29 01:38:41 -05:00
audio.py fix: keep the speech-to-text extension allowlist when the Audio settings are saved (#30208) 2026-09-19 17:36:38 -04:00
auths.py refac 2026-09-21 10:44:37 -04:00
automations.py refac 2026-09-21 08:59:39 -04:00
calendar.py refac 2026-09-21 08:59:39 -04:00
channels.py fix: honor ENABLE_PROFILE_IMAGE_URL_FORWARDING for channel webhook profile images (#29889) 2026-09-12 16:06:34 -05:00
chats.py fix: clean up orphan tags for the chat's owner, not the admin, when an admin deletes another user's chat (#30171) 2026-09-19 15:40:58 -05:00
configs.py refac 2026-09-21 11:09:09 -04:00
evaluations.py refac 2026-09-06 16:48:30 -04:00
files.py refac 2026-09-21 10:19:59 -04:00
folders.py refac 2026-09-21 14:43:04 -04:00
functions.py fix: drop a deleted plugin's source from the content cache (#29983) 2026-09-13 20:21:40 -04:00
groups.py refac 2026-06-29 05:47:21 -05:00
images.py fix: detect the real image type of bare base64 generated images (#30359) 2026-09-22 11:35:59 -04:00
knowledge.py refac 2026-09-21 10:19:59 -04:00
memories.py refac 2026-09-16 00:34:24 -04:00
models.py refac 2026-09-21 10:25:20 -04:00
notes.py fix: keep a note's sharing when a collaborator saves it (#30175) 2026-09-19 10:00:39 -05:00
notifications.py refac 2026-07-27 19:39:36 -04:00
ollama.py fix: stop forwarding upstream Server and Date headers from the OpenAI and Ollama proxies (#29843) 2026-09-09 16:35:48 -04:00
openai.py fix: convert forced tool_choice and non-streaming tool calls for Responses API connections (#30095) 2026-09-18 19:18:26 -04:00
pipelines.py perf: skip pipeline filter session setup when no filters exist (#29146) 2026-08-28 12:22:23 -04:00
prompts.py refac 2026-08-31 00:39:16 -04:00
retrieval.py feat: add Staan as a native web search provider (#30138) 2026-09-18 10:38:36 -05:00
scim.py refac 2026-09-17 20:11:05 -04:00
skills.py perf: stop scanning every skill on each listing and chat turn (#28798) 2026-08-19 11:07:33 -07:00
tasks.py refac 2026-08-11 01:15:05 -06:00
terminals.py refac 2026-09-21 10:30:53 -04:00
tools.py refac 2026-09-21 08:31:27 -04:00
users.py refac 2026-09-07 14:46:52 -04:00
utils.py refac 2026-09-06 17:27:30 -04:00