Home

Use Sharp To Process An Image

javascript
si

sharp("input.jpg")
  .resize({ width: 1024, height: 768 })
  .toFile("output.jpg")

More details here: https://sharp.pixelplumbing.com/api-resize

Installation is done with:

Install with:

bash
npm install sharp
# or
yarn add sharp
~ fin ~