From b1d30673b69571e081abb881d34944cf33cdc67e Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 5 Jan 2026 21:54:33 +0400 Subject: [PATCH] refac --- .../admin/Settings/Evaluations/ArenaModelModal.svelte | 2 +- .../components/chat/Settings/Account/UserProfileImage.svelte | 2 +- src/lib/components/workspace/Models/ModelEditor.svelte | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/admin/Settings/Evaluations/ArenaModelModal.svelte b/src/lib/components/admin/Settings/Evaluations/ArenaModelModal.svelte index 48b9d57d3..ef78d2352 100644 --- a/src/lib/components/admin/Settings/Evaluations/ArenaModelModal.svelte +++ b/src/lib/components/admin/Settings/Evaluations/ArenaModelModal.svelte @@ -201,7 +201,7 @@ ctx.drawImage(img, offsetX, offsetY, newWidth, newHeight); // Get the base64 representation of the compressed image - const compressedSrc = canvas.toDataURL('image/jpeg'); + const compressedSrc = canvas.toDataURL('image/webp', 0.8); // Display the compressed image profileImageUrl = compressedSrc; diff --git a/src/lib/components/chat/Settings/Account/UserProfileImage.svelte b/src/lib/components/chat/Settings/Account/UserProfileImage.svelte index bda54d0dd..597af09ab 100644 --- a/src/lib/components/chat/Settings/Account/UserProfileImage.svelte +++ b/src/lib/components/chat/Settings/Account/UserProfileImage.svelte @@ -61,7 +61,7 @@ ctx.drawImage(img, offsetX, offsetY, newWidth, newHeight); // Get the base64 representation of the compressed image - const compressedSrc = canvas.toDataURL('image/jpeg'); + const compressedSrc = canvas.toDataURL('image/webp', 0.8); // Display the compressed image profileImageUrl = compressedSrc; diff --git a/src/lib/components/workspace/Models/ModelEditor.svelte b/src/lib/components/workspace/Models/ModelEditor.svelte index a0a1c7b7b..af863cc86 100644 --- a/src/lib/components/workspace/Models/ModelEditor.svelte +++ b/src/lib/components/workspace/Models/ModelEditor.svelte @@ -391,7 +391,7 @@ ctx.drawImage(img, offsetX, offsetY, newWidth, newHeight); // Get the base64 representation of the compressed image - const compressedSrc = canvas.toDataURL(); + const compressedSrc = canvas.toDataURL('image/webp', 0.8); // Display the compressed image info.meta.profile_image_url = compressedSrc;