sharp vs Jimp
sharp vs Jimp compared for 2026: the libvips-based native image library (sharp 0.35.6) vs the pure-JavaScript Jimp 2.3.0 rewrite. Includes resize, thumbnail, WebP, PNG and AVIF timings, memory, concurrency, event-loop, EXIF and browser-bundle tests we ran on 5 December 2026.
Quick Answer
Use sharp on servers and Jimp only where native binaries cannot go. On one CPU core, sharp 0.35.6 resized our 2725x2225 JPEG to 720x588 and re-encoded it in 29-36 ms; Jimp 2.3.0 took 348-451 ms. A 200x200 thumbnail took 14-16 ms against 243-261 ms, and 16 concurrent jobs on 2 cores finished in 321 ms against 5,776 ms. Jimp is pure JavaScript, so it runs in the browser (a 703,564 B bundle in our build) and installs without platform binaries, but it blocks the Node.js event loop while it works: a 1 ms timer went 1.6-1.8 seconds without firing during five Jimp jobs, against a 5 ms worst gap with sharp. Jimp 2.0 (November 2026) was a large release with drawing, fonts, animated GIFs and new format plugins; WebP and AVIF need the separate @jimp/wasm-webp and @jimp/wasm-avif packages. Jimp's WASM AVIF encoder beat sharp's default AVIF settings (906-1,075 ms against 1,854-2,059 ms), but sharp at effort 2 encoded the same image in 249 ms.
Last updated December 5, 2026. Covers sharp 0.35.6 (28 November 2026, libvips 8.18.8) and Jimp 2.3.0 (4 December 2026) with @jimp/wasm-webp and @jimp/wasm-avif 2.3.0; npm registry metadata and download counts, GitHub repositories and releases, sharp changelogs and performance docs, the Jimp README and CHANGELOG read on 5 December 2026, plus speed, memory, concurrency, event-loop, format and EXIF tests we ran that day.
| Feature | sharp | Jimp |
|---|---|---|
| Licence & Repository | Apache-2.0; lovell/sharp, ~32.9k stars, 123 open issues and PRs | MIT; jimp-dev/jimp, ~14.7k stars, 0 open issues |
| Latest Release | 0.35.6 on 28 Nov 2026 (libvips 8.18.8) | 2.3.0 on 4 Dec 2026 (2.0.0 on 24 Nov 2026) |
| npm Weekly Downloads (28 Nov-4 Dec 2026) | 147,695,088 | 3,821,514 |
| Our Run: Install (packages / size, linux-x64) | 9 packages, 29.9 MB (libvips 18.9 MB) | 72 packages, 35.8 MB |
| Engine | libvips (C), prebuilt per platform; WebAssembly fallback | Pure JavaScript; optional WASM format plugins |
| Node.js Requirement | >= 20.9.0 | >= 22 |
| Formats Out of the Box | JPEG, PNG, WebP, AVIF, TIFF, GIF in/out; SVG in | BMP, GIF, ICO, PNG, JPEG, TIFF; WebP/AVIF/JXL/JP2/SVG via @jimp/wasm-* plugins |
| Our Run: JPEG Resize 2725x2225 → 720x588 (1 core) | 29-36 ms, 68,016 B | 348-451 ms, 65,534 B |
| Our Run: 200x200 Thumbnail (1 core) | 14-16 ms | 243-261 ms |
| Our Run: WebP q80 Output (1 core) | 61-69 ms, 47,554 B | 300-422 ms, 44,498 B (with @jimp/wasm-webp) |
| Our Run: PNG Output, Defaults (1 core) | 46-66 ms, 1,000,340 B | 302-362 ms, 633,339 B |
| Our Run: AVIF Output, Defaults (1 core) | 1,854-2,059 ms, 25,925 B (q50, effort 4); effort 2: 249 ms | 906-1,075 ms, 22,268 B (q50, @jimp/wasm-avif defaults) |
| Our Run: 16 Concurrent JPEG Jobs (2 cores) | 321 ms | 5,776 ms |
| Our Run: Peak RSS per Process | 76-182 MB | 182-339 MB |
| Our Run: Event-Loop Blocking | Not blocked (worst 1 ms timer gap 5 ms) | Blocked for the whole job (1.6-1.8 s gap over 5 jobs) |
| Our Run: EXIF Orientation 6/8 | Sideways unless .autoOrient() is called | Auto-rotated (exifRotate option to skip) |
| Our Run: Huge-Image Guard | Rejected 20000x20000 input by default | None hit: allocated a 30000x30000 bitmap |
| Runs in the Browser | ||
| Our Run: Read Dimensions | Header only: 50 reads in 17 ms | Full decode: 5 reads in 863 ms |
| Release Activity | 0.35.0 Jun, 0.35.1-0.35.5 Jun-Sep, 0.35.6 Nov 2026 | 1.7.0 22 Nov, 2.0.0-2.3.0 24 Nov-4 Dec 2026 |
sharp
sharp is Lovell Fuller's Node-API image processing module built on the libvips C library; its README lists Node.js (>= 20.9.0), Deno and Bun as supported runtimes. It decodes, resizes, rotates, crops, composites and converts JPEG, PNG, WebP, AVIF, TIFF and GIF, reads SVG, and exposes a chainable promise or stream API: sharp(input).resize(720).webp({ quality: 80 }).toBuffer(). Work runs on libuv's thread pool (four threads by default) and libvips' own threads, so it does not block the event loop. Prebuilt binaries ship as per-platform optional packages under @img, with a WebAssembly build for platforms without one; the 0.35.6 binaries bundle libvips 8.18.8, mozjpeg, libwebp 1.6.0 and libheif with aom. Version 0.35.0 (10 June 2026) dropped Node.js 18, removed the install script, retuned lossy AVIF with SSIMULACRA2-based quality metrics, added a limitInputChannels default, ESM support, gain-map handling for HDR JPEGs and toUint8Array(), and took WebAssembly out of experimental status. 0.35.6 (28 November 2026) fixed several memory leaks and ICC-profile issues. It is licensed Apache-2.0.
Pros
- About 10-18x faster than Jimp in our single-core JPEG runs: resize 29-36 ms, thumbnail 14-16 ms
- Scales across cores: 16 concurrent jobs in 321 ms on 2 cores, against 5,776 ms for Jimp
- Never blocked the event loop: the longest 1 ms timer gap was 5 ms
- WebP, AVIF, TIFF, GIF and SVG input built in, plus fine-grained encoder options
- Safe defaults: refused a 20000x20000 PNG with 'Input image exceeds pixel limit'
- metadata() reads headers without decoding: 50 calls in 17 ms
Cons
- Native binaries: 29.9 MB installed on linux-x64, and a missing prebuilt means WebAssembly or a source build
- Server-side only: an esbuild browser bundle failed on node:events, node:module and node:os
- Defaults need tuning: PNG output was 1,000,340 B until adaptiveFiltering cut it to 649,764 B, and default AVIF took ~1.9 s
- No auto-rotation unless asked: EXIF orientation 6 and 8 images came out sideways without .autoOrient()
- No JPEG XL in the prebuilt binaries (jxlsave_buffer not found)
Best For
Any server, worker or build step that resizes or converts images: upload pipelines, thumbnail services, static-site image optimisation and on-the-fly CDN-style transforms.
Jimp
Jimp (JavaScript Image Manipulation Program) is an image library written entirely in JavaScript with no native dependencies, so it runs anywhere JavaScript runs: Node.js, browsers and bundlers. Images are decoded into an RGBA bitmap you can read and write pixel by pixel, then transformed with plugins (resize, crop, cover, contain, rotate, blur, colour adjustments, dithering, masks, print for text) and written back out with getBuffer() or write(). The default build reads and writes BMP, GIF, ICO, PNG, JPEG and TIFF; WebP, AVIF, JPEG XL, JPEG 2000 and SVG come from separate WASM format plugins that you register with createJimp(). Jimp 2.0 (November 2026) was a large release: it requires Node.js 22, fixes many long-standing bugs in blur, cover/contain, autocrop and colour handling, and adds TrueType and WOFF fonts, a drawing plugin, animated GIF and multi-page TIFF support, Display P3 and ICC profiles and morphology filters. 2.1.0 moved to maintained forks of jpeg-js and pngjs, 2.2.0 added BlurHash, palette extraction, a flexbox-style @jimp/layout renderer for OG images and @jimp/worker for running off the main thread, and 2.3.0 (4 December 2026) is the current release. It is MIT-licensed.
Pros
- Pure JavaScript: runs in browsers and bundlers (our browser bundle built at 703,564 B) and installs with no native binaries
- Direct pixel access plus drawing, fonts, dithering, masks and BlurHash for generative images
- Auto-rotated EXIF orientation 6 and 8 images without being asked
- Fast WASM AVIF encoder at defaults: 906-1,075 ms against sharp's 1,854-2,059 ms
- Very active: seven releases from 1.7.0 to 2.3.0 between 22 November and 4 December 2026, 0 open issues
Cons
- About 10-18x slower than sharp for JPEG in our single-core runs (resize 348-451 ms, thumbnail 243-261 ms) and 4-7x slower for WebP and PNG
- Blocks the event loop: a 1 ms timer went 1.6-1.8 s without firing during five back-to-back jobs
- No parallelism by default: 16 concurrent jobs took 5,776 ms on 2 cores (@jimp/worker exists but is opt-in)
- No WebP or AVIF by default: 'Mime type image/webp does not support decoding' until you add the WASM plugins
- Decodes the whole image to read dimensions (5 reads in 863 ms) and allocated a 30000x30000 bitmap (3.6 GB) without a guard
Best For
Browser-side editing, environments where native modules cannot be installed, low-volume scripts and generative images that need pixel-level drawing, text and layout.
Native libvips vs pure JavaScript
The two libraries take opposite approaches. sharp is a thin JavaScript layer over libvips, a C image library, and its prebuilt binaries bundle mature codecs (mozjpeg, libwebp, libheif with aom, libpng); its README credits libvips for resizes typically 4-5 times faster than the quickest ImageMagick and GraphicsMagick settings, with Lanczos resampling and correct ICC and alpha handling. Calls run on libuv's thread pool, so a resize is an asynchronous native job that leaves the event loop free. The cost is distribution: npm installs a platform package such as @img/sharp-linux-x64 plus @img/sharp-libvips-linux-x64, 29.9 MB in all on our Linux sandbox, and since 0.35.0 there is no install script to fall back on, so unusual platforms use the WebAssembly build or a source build. Jimp decodes the file into a plain RGBA Uint8Array and runs every operation in JavaScript. That makes it portable (it bundled for the browser with esbuild, where sharp failed on node:events, node:module and node:os) and easy to extend with your own pixel loops, but it is bound by single-threaded JavaScript speed and holds full bitmaps in memory. Jimp 2.x splits functionality into 32 @jimp packages (72 installed packages, 35.8 MB) and keeps newer codecs in optional WASM plugins. Our AVIF vs WebP guide covers the formats themselves.
What we measured: speed, size and memory
On 5 December 2026 we ran sharp 0.35.6 and Jimp 2.3.0 on Node.js 22.23.5 in a 2-vCPU sandbox, pinned to one core, on the 2725x2225 JPEG that sharp's own benchmark uses, and took the median of each pass over three passes. Resizing to 720x588 and writing JPEG at quality 80 took 29-36 ms with sharp and 348-451 ms with Jimp; a 200x200 cover thumbnail took 14-16 ms against 243-261 ms. WebP at quality 80 took 61-69 ms against 300-422 ms (Jimp with @jimp/wasm-webp). PNG took 46-66 ms against 302-362 ms. Output sizes were close for lossy formats: 68,016 B against 65,534 B for JPEG and 47,554 B against 44,498 B for WebP. Against a Lanczos-3 reference rendered by sharp, which favours sharp, sharp's JPEG scored 36.4 dB PSNR and Jimp's 34.8 dB. sharp's default PNG was much larger, 1,000,340 B against 633,339 B, because adaptive filtering is off by default; with adaptiveFiltering: true it fell to 649,764 B in 67 ms. Peak resident memory per process was 76-182 MB for sharp and 182-339 MB for Jimp. sharp's own performance page reports a similar gap against Jimp 1.6.1 on 4-core EC2 machines (3.44 against 89.63 operations per second).
Concurrency and the event loop
Speed per image matters less in a web server than what happens to everything else while images are processed. We started 16 JPEG resize jobs at once on two cores: sharp finished all of them in 321 ms because libvips work runs on background threads, while Jimp took 5,776 ms, roughly 16 times its single-image time, because every job ran in turn on the main JavaScript thread. We then ran five jobs back to back with a 1 ms setInterval timer as a stand-in for incoming requests. With sharp the timer fired 131-172 times and the longest gap between ticks was 5 ms. With Jimp the timer fired 16-17 times in total and the longest gap was 1,594-1,764 ms: the whole run, since each await resolved without giving timers a turn. In a real API that means every other request waits while Jimp works. sharp's thread pool defaults to four threads (UV_THREADPOOL_SIZE), which its documentation suggests raising on machines with more cores, and it recommends MALLOC_ARENA_MAX=2 on glibc Linux to limit memory fragmentation. Jimp 2.2.0 added @jimp/worker to run off the main thread, which we did not benchmark; without it, keep Jimp out of request handlers.
Formats, EXIF and safety defaults
sharp's prebuilt binaries read and write JPEG, PNG, WebP, AVIF, TIFF and GIF and read SVG; JPEG XL is not compiled in, and asking for it failed with jxlsave_buffer not found. Jimp's default build covers BMP, GIF, ICO, PNG, JPEG and TIFF. Reading a WebP file failed with 'Mime type image/webp does not support decoding' and writing one with 'Unsupported MIME type: image/webp' until we built a custom instance with createJimp() and the @jimp/wasm-webp and @jimp/wasm-avif plugins, which the README notes work only in ESM. AVIF was the one task where Jimp was faster: its WASM encoder at quality 50 took 906-1,075 ms, against 1,854-2,059 ms for sharp at quality 50 and its default effort 4, a setting 0.35.0 retuned around SSIMULACRA2 metrics. The quality scales differ, so do not compare those file sizes directly, and sharp at effort 2 took 249 ms for a 27,872 B file. Orientation differs too: with EXIF orientation 6 and 8 test images (stored 450x600), Jimp auto-rotated to 300x225 on resize, while sharp produced a sideways 300x400 until we added .autoOrient(). On oversized inputs sharp refused a 20000x20000 PNG under its default pixel limit; Jimp allocated a 30000x30000 bitmap (3.6 GB) without complaint, so validate dimensions first.
Releases, migration and when Jimp is the right call
Both projects are active. sharp shipped 0.35.0 in June 2026 and five patch releases since, the latest on 28 November 2026, with 123 open issues and pull requests in a repository downloaded about 148 million times a week. Jimp went from 1.6.1 (April 2026) to 1.7.0 on 22 November and then 2.0.0 through 2.3.0 in under two weeks, with zero open issues. Jimp 2.0 has breaking changes (Node.js 22 minimum, removed no-op options, corrected blur radius, cover/contain alignment and greyscale rounding), so pin versions and check its v2 migration guide if you are on 1.x. Moving from Jimp to sharp is mostly mechanical: Jimp.read(buf) then resize({ w }) then getBuffer('image/jpeg', { quality }) becomes sharp(buf).resize(w).jpeg({ quality }).toBuffer(), with .autoOrient() added for photos. Pixel-level code is the exception: sharp gives you raw buffers through .raw(), but drawing, text and layout are Jimp strengths. Keep Jimp for browser editors, sandboxes where native or WASM modules are unwelcome, test fixtures, and OG-image or badge generation at low volume. For production thumbnailing, uploads and format conversion, sharp is the default for good reason. Our OG Image Generator tool covers social images without code.
Verdict
Use sharp for any server-side image work. In our tests it was about 10-18 times faster per JPEG image on one core and 4-7 times faster for WebP and PNG, used roughly half the memory, spread 16 concurrent jobs across both cores in 321 ms where Jimp needed 5,776 ms, and never blocked the event loop. It also reads WebP and AVIF out of the box, reads dimensions from headers without decoding, and refuses absurdly large inputs by default. Set its options deliberately: call .autoOrient() for camera uploads, turn on adaptiveFiltering for PNG, and lower AVIF effort if encode time matters (effort 2 took 249 ms against about 1.9 s at the default). Use Jimp when sharp cannot run or would be overkill: image editing in the browser, a platform with no sharp binary where you would rather not depend on WebAssembly, a small CLI or test helper processing a handful of images, or generative graphics where Jimp 2's drawing, font and layout plugins and direct pixel access are the point. If you use Jimp in a Node.js server, move it off the main thread with @jimp/worker or worker_threads, add your own size limit before decoding, and register @jimp/wasm-webp and @jimp/wasm-avif if you need modern formats. For one-off conversions, our Image Compressor, Image Resizer and Image Format Converter tools run in the browser with no code.


