2 import * as sharp from 'sharp'
3 import { remove } from 'fs-extra'
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 remove(physicalFile.path)
17 // ---------------------------------------------------------------------------