mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
Merge pull request #12192 from Ithanil/avatar_compression
feat: adjust jpeg compression quality to 0.15 for avatar uploads
This commit is contained in:
commit
9c00f3caf3
1 changed files with 2 additions and 1 deletions
|
|
@ -132,7 +132,8 @@
|
|||
ctx.drawImage(img, offsetX, offsetY, newWidth, newHeight);
|
||||
|
||||
// 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
|
||||
profileImageUrl = compressedSrc;
|
||||
|
|
|
|||
Loading…
Reference in a new issue