Is there any option to reduce the image size and resize the image in nodejs with multer functionality?

Viewed 8815
var storage = multer.diskStorage({
  destination: function (req, file, cb) {
    cb(null, '/tmp/my-uploads')
  },
  filename: function (req, file, cb) {
    cb(null, file.fieldname + '-' + Date.now())
  }
})

var upload = multer({ storage: storage })

I need to resize the image and compress the image size to lowest and upload into the directory.Any help?

2 Answers
Related