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
81.6
Maintenance
100
Vulnerability
92.8
License
JavaScript (76.41%)
C++ (20.1%)
TypeScript (2.03%)
Python (1.14%)
Dockerfile (0.13%)
Shell (0.12%)
C (0.07%)
Total Downloads
692,841,079
Last Day
455,000
Last Week
5,462,600
Last Month
30,454,840
Last Year
292,955,404
29,507 Stars
2,156 Commits
1,302 Forks
229 Watching
3 Branches
210 Contributors
Latest Version
0.33.5
Package Id
sharp@0.33.5
Unpacked Size
491.04 kB
Size
110.76 kB
File Count
32
NPM Version
9.8.1
Node Version
18.18.0
Publised On
16 Aug 2024
Cumulative downloads
Total Downloads
Last day
-67.6%
455,000
Compared to previous day
Last week
-27.3%
5,462,600
Compared to previous week
Last month
0.5%
30,454,840
Compared to previous month
Last year
87.5%
292,955,404
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 24 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-23
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