Fast and secure standalone server for resizing, processing, and converting images on the fly
Opening the entry
Opening the entry
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library
Sharp is a high-performance Node.js image processing module that uses libvips to resize and convert JPEG, PNG, WebP, AVIF, and TIFF images. It works with Node.js 20.9+, Deno, and Bun via Node-API v9. Resizing is typically 4-5x faster than ImageMagick while preserving color spaces, ICC profiles, and alpha transparency with Lanczos resampling. It also supports rotation, extraction, compositing, and gamma correction.
npm install sharp
const output = await sharp('input.jpg')
.autoOrient()
.resize({ width: 200 })
.jpeg({ mozjpeg: true })
.toBuffer();lovell/sharp is a third-party open-source project, listed here from public GitHub data. ImuTechz did not write it and has not reviewed or security-audited its code. Read the source and its permissions before you install or run it.