PACKAGE · IMAGE PROCESSING

sharp

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images

WEEKLY DOWNLOADS 166.1M
STARS 32.9K
FORKS 1.5K
OPEN ISSUES 130
GZIP SIZE 40.4 kB
UNPACKED SIZE 962.2 kB
DEPENDENCIES 5
LAST UPDATED 10mo ago
DOWNLOAD TRENDS

sharp downloads · last 12 months

Download trends for sharp1 download series from Nov 2025 to Oct 2026. Use left and right arrow keys to inspect monthly values.0137.5M274.9M412.4M549.8MNov 2025FebMayAugOct 2026
sharp
ABOUT SHARP

sharp is a Node.js image-processing module for resizing, cropping, and converting image files. It handles JPEG, PNG, WebP, GIF, AVIF, and TIFF, and addresses the work of transforming images in application code or automated processing workflows.

Its design emphasizes high-performance image operations through libvips, with an API centered on composing image transformations rather than building a processing pipeline from low-level pixel operations. It is aimed at Node.js developers who need to manipulate images programmatically, including preparing uploaded images, generating resized variants, or converting between supported formats.

The typical pattern is to create a sharp instance from an input and chain operations such as resize and format conversion before writing an output. This makes it possible to express a sequence of transformations in one pipeline; the package’s supported topics also include crop, EXIF, and ICC-related image handling. Check the documentation for exact method signatures and option behavior for the version in use.

sharp fits into Node.js services, command-line scripts, and build or content workflows that process image files. Its format support can help implement server-side image variants or format conversion without moving those transformations to a browser, while its Node.js focus makes it suitable for integration with application code that accepts or produces image data.

The package description identifies sharp as the fastest module for resizing the listed image formats, and its 40.4 kB gzip bundle size is a provided package metric; actual runtime performance depends on the workload and environment. At version 0.35.5, it has 50.6M weekly downloads and 32.8K GitHub stars, with 121 open issues, indicating a mature, actively used project while still warranting review of version-specific behavior and compatibility.

A practical caveat is that sharp is specifically an image-processing dependency, not a general image editing interface or a complete asset-management workflow. Confirm that the formats and transformations required by your application are supported, and account for the package’s native image-processing dependencies when planning deployment and runtime environments.

WHEN TO USE
  • Generate resized image variants in a Node.js service by applying sharp's resize operation to uploaded or stored images.
  • Convert incoming JPEG, PNG, WebP, GIF, AVIF, or TIFF files to another supported output format in a processing pipeline.
  • Crop images as part of a server-side transformation chain before writing the processed result.
  • Automate image preparation in Node.js scripts or build workflows that produce optimized assets from source files.
  • Use sharp when application code needs to account for image metadata such as EXIF or ICC-related information during processing.
  • Keep multiple image transformations in one sharp instance and write the resulting output as a single pipeline.
WHEN NOT TO USE
  • If the required input or output format is not among JPEG, PNG, WebP, GIF, AVIF, and TIFF, use a processing approach that supports that format or convert the asset before passing it to sharp.
  • If image transformations must run entirely in a browser, use a browser-side image workflow rather than sharp's Node.js module.
  • If the task is image viewing, annotation, or interactive editing rather than programmatic transformation, use a dedicated interface or editing workflow.
  • If deployment cannot accommodate sharp's image-processing dependencies, choose a processing method compatible with the target runtime or perform transformations in a separate environment.
  • If the application only needs to store or deliver original image files without transforming them, keep image handling in the existing storage or delivery workflow instead of adding sharp.
  • If exact EXIF or ICC behavior is a requirement, verify the version-specific API and output behavior first; otherwise, choose a workflow with explicitly documented metadata guarantees.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 3
sharp vs cloudinary ★ 673 · 1.0M/wk sharp vs jimp ★ 14.7K · 4.4M/wk sharp vs bwip-js ★ 2.4K · 1.9M/wk