sharp npm 1

sharp npm

# Installation
npm install sharp

Here is what the above code is Doing:
1. We’re importing the sharp package.
2. We’re creating a new sharp object, passing in the path to the image we want to resize.
3. We’re calling the resize method on the sharp object, passing in the width and height we want to resize the image to.
4. We’re calling the toFile method on the sharp object, passing in the path to the new image we want to create.

Similar Posts