mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-28 06:22:33 +00:00
fix: editing a WebP image fails with the built-in image editor (#32902)
Editing a WebP image (an uploaded one, or one generated by a provider that returns WebP) failed in the Docker image. Python only learns the WebP type from a system file the image does not ship, so the picture went to the image provider labelled with no type at all, and providers rejected it. WebP is now registered at startup like the other types Open WebUI already sets, so the provider receives it as image/webp. Fixes #32899
This commit is contained in:
parent
3a95998e32
commit
f6f42b0111
1 changed files with 2 additions and 0 deletions
|
|
@ -3111,6 +3111,8 @@ async def check_db_health():
|
|||
mimetypes.add_type('text/javascript', '.js')
|
||||
mimetypes.add_type('text/javascript', '.mjs')
|
||||
mimetypes.add_type('application/wasm', '.wasm')
|
||||
# Python before 3.13 only knows .webp from /etc/mime.types, which the Docker image does not ship
|
||||
mimetypes.add_type('image/webp', '.webp')
|
||||
|
||||
# Serve build-time static assets (CSS, JS, images, favicon, etc.)
|
||||
app.mount('/static', StaticFiles(directory=STATIC_DIR), name='static')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue