NodeJs Respate nítido al ancho o altura máxima

const img = fs.readFileSync('./tmp/image.jpg')

// Will resize to max 680px height or max 650px width
await sharp(img).resize({
  width: 650,
  height: 680,
  fit: 'inside',
}).toFormat('jpg').toFile('./tmp/final.jpg')
florinrelea