enh: model gif/webp support

This commit is contained in:
Timothy Jaeryang Baek
2026-01-05 17:56:41 +04:00
parent a3270648d8
commit 00af37bb4e

View File

@@ -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;