Quick and Fast Image Processing Module in Node.js
Sharp is an image processing module which uses the libvips library to provide fast processing for Node.js projects.
Sharp is a fast processing image module for Node.js projects that is powered by libvips image processing library. Due to this addition, Sharp like the name suggests, has a high speed processing power as it only stores a few regions of the uncompressed image data in the memory freeing up much of the used CPU power and L1/L2/L3 cache
The library also makes sure that no child processes are spawned and async or await processes are supported. As an open source image processing module, Sharp supports multiple image formats and uncompressed raw pixel data as well. For optimal performance make sure you are using Node.js version 10 and above.
At A Glance
An overview of Sharp features.
- Convert images
- Convert to JPEG
- Convert to PNG
- Convert to WebP
- Convert to AVIF
- Resize Image
Sharp supports the popular Image file formats listed below.
Sharp can be used in multiple environments like Node or browsers etc.
Getting Started with Sharp
The recommended way to install Sharp via NPM. Please use the following command to install it.
Install Sharp via NPM
npm install sharp