Gathering detailed insights and metrics for sharp
Gathering detailed insights and metrics for sharp
Gathering detailed insights and metrics for sharp
Gathering detailed insights and metrics for sharp
@img/sharp-linux-x64
Prebuilt sharp for use with Linux (glibc) x64
@img/sharp-libvips-linux-x64
Prebuilt libvips and dependencies for use with sharp on Linux (glibc) x64
@img/sharp-linuxmusl-x64
Prebuilt sharp for use with Linux (musl) x64
@img/sharp-libvips-linuxmusl-x64
Prebuilt libvips and dependencies for use with sharp on Linux (musl) x64
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
npm install sharp
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (76.78%)
C++ (19.77%)
TypeScript (2.04%)
Python (1.15%)
Shell (0.11%)
Dockerfile (0.08%)
C (0.07%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
30,808 Stars
2,260 Commits
1,350 Forks
231 Watchers
2 Branches
218 Contributors
Updated on Jul 14, 2025
Latest Version
0.34.3
Package Id
sharp@0.34.3
Unpacked Size
521.17 kB
Size
116.94 kB
File Count
32
NPM Version
10.9.2
Node Version
22.14.0
Published on
Jul 10, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
21
22
The typical use case for this high speed Node-API module is to convert large images in common formats to smaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions.
It can be used with all JavaScript runtimes that provide support for Node-API v9, including Node.js (^18.17.0 or >= 20.3.0), Deno and Bun.
Resizing an image is typically 4x-5x faster than using the quickest ImageMagick and GraphicsMagick settings due to its use of libvips.
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.
Most modern macOS, Windows and Linux systems do not require any additional install or runtime dependencies.
Visit sharp.pixelplumbing.com for complete installation instructions, API documentation, benchmark tests and changelog.
1npm install sharp
1const sharp = require('sharp');
1sharp(inputBuffer) 2 .resize(320, 240) 3 .toFile('output.webp', (err, info) => { ... });
1sharp('input.jpg') 2 .rotate() 3 .resize(200) 4 .jpeg({ mozjpeg: true }) 5 .toBuffer() 6 .then( data => { ... }) 7 .catch( err => { ... });
1const semiTransparentRedPng = await sharp({ 2 create: { 3 width: 48, 4 height: 48, 5 channels: 4, 6 background: { r: 255, g: 0, b: 0, alpha: 0.5 } 7 } 8}) 9 .png() 10 .toBuffer();
1const roundedCorners = Buffer.from( 2 '<svg><rect x="0" y="0" width="200" height="200" rx="50" ry="50"/></svg>' 3); 4 5const roundedCornerResizer = 6 sharp() 7 .resize(200, 200) 8 .composite([{ 9 input: roundedCorners, 10 blend: 'dest-in' 11 }]) 12 .png(); 13 14readableStream 15 .pipe(roundedCornerResizer) 16 .pipe(writableStream);
A guide for contributors covers reporting bugs, requesting features and submitting code changes.
Copyright 2013 Lovell Fuller and others.
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 https://www.apache.org/licenses/LICENSE-2.0
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.
7.8/10
Summary
sharp vulnerability in libwebp dependency CVE-2023-4863
Affected Versions
< 0.32.6
Patched Versions
0.32.6
6.5/10
Summary
sharp vulnerable to Command Injection in post-installation over build environment
Affected Versions
< 0.30.5
Patched Versions
0.30.5
Reason
no dangerous workflow patterns detected
Reason
30 commit(s) and 25 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
GitHub workflow tokens follow principle of least privilege
Details
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
no binaries found in the repo
Reason
project is fuzzed
Details
Reason
Found 5/30 approved changesets -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
Project has not signed or included provenance with any releases.
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More