This commit is contained in:
Timothy Jaeryang Baek
2026-01-05 21:54:33 +04:00
parent bb821ab654
commit b1d30673b6
3 changed files with 3 additions and 3 deletions
@@ -201,7 +201,7 @@
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 compressedSrc = canvas.toDataURL('image/webp', 0.8);
// Display the compressed image // Display the compressed image
profileImageUrl = compressedSrc; profileImageUrl = compressedSrc;
@@ -61,7 +61,7 @@
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 compressedSrc = canvas.toDataURL('image/webp', 0.8);
// Display the compressed image // Display the compressed image
profileImageUrl = compressedSrc; profileImageUrl = compressedSrc;
@@ -391,7 +391,7 @@
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(); const compressedSrc = canvas.toDataURL('image/webp', 0.8);
// Display the compressed image // Display the compressed image
info.meta.profile_image_url = compressedSrc; info.meta.profile_image_url = compressedSrc;