Sharp is working but giving a warning message: jpegsave_buffer: no property named 'subsample_mode'

Viewed 182

I'm running a node application. For Image processing I was using multer and sharp packages. Everything seems to be working fine. I get whatever result I want like saving the image in a file or just only getting the buffer including features like resize, crop etc. But I'm facing a warning message like this in the console.

** (sharp:8480): WARNING **: 19:23:34.177: jpegsave_buffer: no property named 'subsample_mode'

My code goes as follows:

const storage = multer.memoryStorage();
const upload = multer({ storage: storage });

const sharpResize = async function (req, res, next) {
  req.file = await sharp(req.file.buffer)
    .resize(400, 400)
    .toFormat("jpeg")
    .jpeg({ quality: 80 })
    .toBuffer();
  next();
};

app.post("/upload-final", upload.single("image"), sharpResize, (req, res) => {
  console.log(req.file);
  res.json({ msg: "success" });
});

What am I missing or how can I suppress this warning message?

Edit

In case needed I'm using sharp version 0.27.0 and libvips version 8.10.5

0 Answers
Related