initialize first demo of passenger office

This commit is contained in:
2023-07-11 11:37:25 +03:30
parent b8ff3cf49e
commit 40b6361c42
6 changed files with 321 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
import ImageResize from "image-resize";
const ImageResizer = async (image) => {
const imageResize = new ImageResize({
quality: 1,
format: "jpg",
outputType: "base64",
width: 400,
});
const get = await imageResize.get(image);
const resize = await imageResize.resize(get).then();
const output = await imageResize.output(resize).then();
const avatar = await (await import("image-to-file-converter"))
.base64ToFile(output)
.then();
return avatar;
};
export default ImageResizer;