2 import * as sharp from 'sharp'
3 import { unlinkPromise } from './core-utils'
5 async function processImage (
6 physicalFile: { path: string },
8 newSize: { width: number, height: number }
10 await sharp(physicalFile.path)
11 .resize(newSize.width, newSize.height)
14 await unlinkPromise(physicalFile.path)
17 // ---------------------------------------------------------------------------