sharp 0,0,2,3,0,5,9,6 editorconfig travis-ci circleci npm

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP and TIFF images. Uses the libvips library.


npm install sharp

The typical use case for this high speed Node.js module is to convert large images in common formats to smaller, web-friendly JPEG, PNG and WebP images of varying dimensions.

Resizing an image is typically 4x-5x faster than using the quickest ImageMagick and GraphicsMagick settings.

Colour spaces, embedded ICC profiles and alpha transparency channels are all handled correctly. Lanczos resampling ensures quality is not sacrificed for speed.

As well as image resizing, operations such as rotation, extraction, compositing and gamma correction are available.

OS X, Windows (x64), Linux (x64, ARM) systems do not require the installation of any external runtime dependencies.


import sharp from 'sharp';
  .resize(320, 240)
  .toFile('output.webp', (err, info) => ... );
  .then( data => ... )
  .catch( err => ... );
const roundedCorners = new Buffer(
  '<svg><rect x="0" y="0" width="200" height="200" rx="50" ry="50"/></svg>'

const roundedCornerResizer =
    .resize(200, 200)
    .overlayWith(roundedCorners, { cutout: true })


Test Coverage


Visit for complete installation instructions, API documentation, benchmark tests and changelog.


A guide for contributors covers reporting bugs, requesting features and submitting code changes.


Copyright 2013, 2014, 2015, 2016, 2017 Lovell Fuller and contributors.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Related Repositories



High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP and TIFF images. Uses the libvips library. ...



A C# implementation of the WebSocket protocol client and server ...



PST or Phase Stretch Transform is an operator that finds features in an image. PST implemented using MATLAB here, takes an intensity image I as its input, and returns a binary image out of the same size as I, with 1's where the function finds sharp tran ...



A C# priority queue optimized for pathfinding applications ...



PubNub clients for C-Sharp based languages, including MS Windows C#/.net, Silveright, IIS, and Mono ...

Top Contributors

lovell pierreinglebert mhirsch papandreou brandonaaron jonathanong felixbuenemann gasi bkw dacarley kleisauke LinusU mcuelenaere roryrjb salzhrani wjordan brassington chrisriley chanon ide jardakotesovec joelmukuthu jo jtobin68 TheThing julianojulio kapouer rnanwani rayshan teohhanhui


package version
caw ^2.0.0
color ^2.0.0
detect-libc ^0.2.0
got ^7.1.0
nan ^2.6.2
semver ^5.3.0
tar ^3.1.5
dev async ^2.5.0
cc ^1.0.1
documentation ^4.0.0-rc.1
exif-reader ^1.0.2
icc ^1.0.0
mocha ^3.4.2
nyc ^11.0.3
rimraf ^2.6.1
semistandard ^11.0.0
unzip ^0.1.11


-   v0.16.0 zip tar
-   v0.15.1 zip tar
-   v0.15.0 zip tar
-   v0.14.1 zip tar
-   v0.14.0 zip tar
-   v0.13.1 zip tar
-   v0.13.0 zip tar
-   v0.12.2 zip tar
-   v0.12.1 zip tar
-   v0.12.0 zip tar
-   v0.11.4 zip tar
-   v0.11.3 zip tar
-   v0.11.2 zip tar
-   v0.11.1 zip tar
-   v0.11.0 zip tar
-   v0.10.1 zip tar
-   v0.10.0 zip tar
-   v0.9.3 zip tar
-   v0.9.2 zip tar
-   v0.9.1 zip tar
-   v0.9.0 zip tar
-   v0.8.4 zip tar
-   v0.8.3 zip tar
-   v0.8.2 zip tar
-   v0.8.1 zip tar
-   v0.8.0 zip tar
-   v0.7.2 zip tar
-   v0.7.1 zip tar
-   v0.7.0 zip tar
-   v0.6.2 zip tar