mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-07 08:27:05 +00:00
refac
This commit is contained in:
parent
bb821ab654
commit
b1d30673b6
3 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue