Gathering detailed insights and metrics for @img/sharp-linux-x64
Gathering detailed insights and metrics for @img/sharp-linux-x64
Gathering detailed insights and metrics for @img/sharp-linux-x64
Gathering detailed insights and metrics for @img/sharp-linux-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 @img/sharp-linux-x64
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
29,350 Stars
2,156 Commits
1,298 Forks
229 Watching
3 Branches
210 Contributors
Updated on 28 Nov 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
-2.2%
640,110
Compared to previous day
Last week
5.7%
3,637,537
Compared to previous week
Last month
24.4%
14,776,118
Compared to previous month
Last year
1,027,130.6%
86,236,013
Compared to previous year
1
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.
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
7 commit(s) and 20 issue activity found in the last 90 days -- score normalized to 10
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
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
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