import sharp from 'sharp';
import path from 'path';
const imageProcessing = async (filename: string) => {
return
sharp(path.join(__dirname, '../images', filename)).toFile(
path.join(__dirname, '../src/cache', filename))
};
export default imageProcessing;
Utilizing the sharp npm module for file editing. Upon attempting to use the returned promise, the value is showing as undefined. It seems like there may be an issue with how I am handling and returning the promise.
imageProcessing(b).then(result => {
console.log(result);