1
0
Fork 0
mirror of synced 2024-09-30 17:18:14 +13:00

Add back in sharp reference which was commented out

This commit is contained in:
Andrew Kingston 2020-10-13 09:42:44 +01:00
parent 9acab69a06
commit fc870c0dc9

View file

@ -1,5 +1,5 @@
const fs = require("fs")
// const sharp = require("sharp")
const sharp = require("sharp")
const fsPromises = fs.promises
const FORMATS = {
@ -7,14 +7,14 @@ const FORMATS = {
}
async function processImage(file) {
// const imgMeta = await sharp(file.path)
// .resize(300)
// .toFile(file.outputPath)
//
// return {
// ...file,
// ...imgMeta,
// }
const imgMeta = await sharp(file.path)
.resize(300)
.toFile(file.outputPath)
return {
...file,
...imgMeta,
}
}
async function process(file) {