mirror of
https://github.com/open-webui/open-webui
synced 2025-06-04 03:37:35 +00:00
adjust jpeg compression quality to 0.15 for avatar uploads
This commit is contained in:
parent
b5909ffe97
commit
7f5dc22464
@ -132,7 +132,8 @@
|
|||||||
ctx.drawImage(img, offsetX, offsetY, newWidth, newHeight);
|
ctx.drawImage(img, offsetX, offsetY, newWidth, newHeight);
|
||||||
|
|
||||||
// Get the base64 representation of the compressed image
|
// Get the base64 representation of the compressed image
|
||||||
const compressedSrc = canvas.toDataURL('image/jpeg');
|
const jpegQuality = 0.15;
|
||||||
|
const compressedSrc = canvas.toDataURL('image/jpeg', jpegQuality);
|
||||||
|
|
||||||
// Display the compressed image
|
// Display the compressed image
|
||||||
profileImageUrl = compressedSrc;
|
profileImageUrl = compressedSrc;
|
||||||
|
Loading…
Reference in New Issue
Block a user