refac
This commit is contained in:
1 parent
d8bb8c58d0
commit
b3622474d7
1 file changed
+1
-1
@@ -318,7 +318,7 @@ async function resizeImageToDataURL(
|
|||||||
export const compressImage = async (imageUrl, maxWidth, maxHeight) => {
|
export const compressImage = async (imageUrl, maxWidth, maxHeight) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const img = new Image();
|
const img = new Image();
|
||||||
img.onload = () => {
|
img.onload = async () => {
|
||||||
let width = img.width;
|
let width = img.width;
|
||||||
let height = img.height;
|
let height = img.height;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user