mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-05 08:10:30 +00:00
enh: model gif/webp support
This commit is contained in:
parent
a3270648d8
commit
00af37bb4e
1 changed files with 9 additions and 0 deletions
|
|
@ -350,6 +350,15 @@
|
|||
reader.onload = (event) => {
|
||||
let originalImageUrl = `${event.target?.result}`;
|
||||
|
||||
// For animated formats (gif, webp), skip resizing to preserve animation
|
||||
const fileType = (inputFiles[0] as any)?.['type'];
|
||||
if (fileType === 'image/gif' || fileType === 'image/webp') {
|
||||
info.meta.profile_image_url = originalImageUrl;
|
||||
inputFiles = null;
|
||||
filesInputElement.value = '';
|
||||
return;
|
||||
}
|
||||
|
||||
const img = new Image();
|
||||
img.src = originalImageUrl;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue