import sharp from 'sharp';
export default async function resizeImage({
imagePath
}) {
const resizedImagePath = ${process.env.BUCKET_FOLDER_PATH}/${Date.now()}_resized.png;
await sharp(${process.env.BUCKET_FOLDER_PATH}/${imagePath}).resize(40, 40).toFile(resizedImagePath);
return resizedImagePath;
}
import sharp from 'sharp';
export default async function resizeImage({
imagePath
}) {
const resizedImagePath = ${process.env.BUCKET_FOLDER_PATH}/${Date.now()}_resized.png;
await sharp(${process.env.BUCKET_FOLDER_PATH}/${imagePath}).resize(40, 40).toFile(resizedImagePath);
return resizedImagePath;
}