refac
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user