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
@types/sharp
Stub TypeScript definitions entry for sharp, which provides its own types definitions
@img/sharp-libvips-linux-x64
Prebuilt libvips and dependencies for use with sharp on Linux (glibc) x64
@img/sharp-libvips-linuxmusl-x64
Prebuilt libvips and dependencies for use with sharp on Linux (musl) x64
gatsby-sharp
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
60.6
Supply Chain
94.7
Quality
82.8
Maintenance
100
Vulnerability
92.8
License
Total
675,186,989
Last Day
406,151
Last Week
7,621,020
Last Month
30,484,968
Last Year
283,901,875
29,403 Stars
2,156 Commits
1,299 Forks
229 Watching
3 Branches
210 Contributors
Updated on 08 Dec 2024
JavaScript (76.41%)
C++ (20.1%)
TypeScript (2.03%)
Python (1.14%)
Dockerfile (0.13%)
Shell (0.12%)
C (0.07%)
Cumulative downloads
Total Downloads
Last day
12.6%
406,151
Compared to previous day
Last week
9.8%
7,621,020
Compared to previous week
Last month
4.2%
30,484,968
Compared to previous month
Last year
86%
283,901,875
Compared to previous year
3
21
19
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.
Stable Version
1
7.8/10
Summary
sharp vulnerability in libwebp dependency CVE-2023-4863
Affected Versions
< 0.32.6
Patched Versions
0.32.6
1
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
2 commit(s) and 21 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
GitHub workflow tokens follow principle of least privilege
Details
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
project is fuzzed
Details
Reason
Found 6/30 approved changesets -- score normalized to 2
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 2024-12-02
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