Elestia Open Source Ratings
5.3

node-canvas

Reasonable, with limits. 7th of 9 image processing libraries.

node-canvas is the oldest Canvas 2D API for Node.js, built on Cairo. It is still maintained and widely installed, but @napi-rs/canvas now does the same job with easier installs and faster growth. It also does not handle resizing or converting photos, which is sharp's job. It is a reasonable choice when you need Cairo-specific output such as PDF, or when a library you use requires it. For most new projects, pick another tool.

Best for: Projects that need a Cairo-backed canvas with PDF/SVG output, or that use tools built on `canvas`, such as jsdom, Fabric.js or chartjs-node-canvas.

GitHubnpm

Scores

Overall5.3

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 5.0, likely 4.0 to 6.0

It is a working, maintained Canvas API for Node.js with a large installed base. For new projects, @napi-rs/canvas does the same job with no system dependencies, better speed and faster growth. sharp is the right tool for resizing and converting images. node-canvas still makes sense when you need Cairo's PDF output or a library built on it.

GPT-6.2 Sol: 5.6, likely 4.3 to 6.8

Choose node-canvas when Cairo output, multipage PDF drawing, or compatibility with existing code is a requirement. For a new Canvas 2D service, @napi-rs/canvas has easier native deployment and stronger recent momentum. Sharp is the better fit for routine resizing and format conversion. The open JPEG report and limited maintenance capacity weigh on stable v3, while the v4 candidate leaves its longer-term outlook uncertain.

Needed by many3.9

How many developers need a tool for this job?

Claude Opus 5.5: 4.0, likely 3.0 to 5.0

Drawing on a canvas on the server is a clear niche: chart rendering, generated images, PDF rendering and DOM tests under jsdom. It runs only in Node.js and does not resize or convert photos, which most users of this category need. So it serves a smaller group than sharp.

GPT-6.2 Sol: 3.8, likely 2.7 to 5.0

Server-side drawing serves a clear niche that includes charts, generated graphics, and PDFs. The native renderer targets Node.js, and routine resizing and conversion have broader format support in sharp. The developer survey gives context on Node.js use, while demand for server-side Canvas 2D is harder to measure.

Helps a lot6.4

How well does it do the job for those who need it?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

The Canvas API is mature and close to the browser's. It has types, PDF/SVG backends, and the 3.x line made font parsing faster and moved to N-API. Install friction from system libraries is still a real cost. Independent guides rate it slower than the Skia-based peers, and @napi-rs/canvas is easier to deploy.

GPT-6.2 Sol: 6.7, likely 5.6 to 7.8

Stable v3.2.3 has documented drawing and export APIs, built-in types, and custom fonts. Its familiar drawing methods and examples give coding agents a good starting point, though a user reproduced incorrect text bounds on the stable build. An independent PDF.js benchmark found node-canvas slower than @napi-rs/canvas on two PDFs, and performance across other drawing workloads remains uncertain.

Holds up over time4.9

Will it still be a good choice in two years?

Claude Opus 5.5: 5.0, likely 4.0 to 6.5

The project is active, with 86 commits and 3 releases in the last year, and it was pushed in November 2026. The last release, however, was in March 2026. One maintainer published every recent release, and 402 issues are open. The ecosystem is moving towards @napi-rs/canvas, as the pdf.js switch shows.

GPT-6.2 Sol: 4.8, likely 3.6 to 6.3

The project recorded 86 commits and three stable releases in the past year, and a reported GCC regression shipped a fix in nine days. The last stable release was in March, and the recent stable releases came from one GitHub account. A maintainer reports no funding and limited volunteer time, while jsdom has moved to @napi-rs/canvas. Active v4 release-candidate work leaves room for improvement, with its stable release timing and future patch cadence uncertain.

Used widely5.9

How many use it, and is that growing?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

It has 45M downloads in 4 weeks and 38k dependent repos, a large installed base that is mostly chosen directly or through optional peer integrations. Its year-over-year ratio of 2.8x is below the 4.1 median, so it is losing share. @napi-rs/canvas grew about 24x over the same period.

  • npm downloadsLast4Weeks: 45.4M now vs 16.4M a year ago, a ratio of 2.77, below the 4.1 median
  • dependents: 38,000 repos and 4,367 packages
  • peers @napi-rs/canvas: 210M downloads, up from 8.7M a year ago
  • github stars: 10.7k stars

GPT-6.2 Sol: 5.7, likely 4.5 to 6.7

Ecosyste.ms found about 38,000 dependent repositories and 4,367 packages, a substantial footprint that trails sharp and Jimp in tracked repositories. Four-week downloads rose from 16.4 million to 45.4 million, or 2.77×, below the 4.1× catalog median and well behind @napi-rs/canvas growth. Automated and downstream installs blur how many projects actively chose it, and jsdom’s switch points to weaker future uptake.

  • dependents: 38,000 tracked repositories and 4,367 packages
  • npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio: 2.77× growth against a 4.1× median
  • peers: Sharp and Jimp lead tracked reach, and @napi-rs/canvas grew about 24×
  • github.com/fabricjs/fabric.js: Fabric’s Node integration pulls in node-canvas
  • github.com/jsdom/jsdom/releases/tag/v31.0.0: A major downstream integration moved away
Vouched for5.9

Who stands behind it being good?

Claude Opus 5.5: 6.0, likely 4.5 to 7.0

Automattic hosts it, and long-lived tools build on it, such as jsdom's optional canvas support, Fabric.js and Konva in Node, and chartjs-node-canvas. Current independent write-ups recommend it only for existing codebases or Cairo-specific needs. One major consumer, pdf.js, has moved away from it.

GPT-6.2 Sol: 5.7, likely 4.5 to 6.9

Fabric uses node-canvas for its Node.js backend, and Chart.js lists it as an option for server-side chart rendering. Those integrations establish practical use, while jsdom’s switch weakens the case for new adopters. Recent evidence on production reliability and developer satisfaction is thin.

Safe5.1

How safe is it to depend on?

Claude Opus 5.5: 6.0, likely 4.5 to 7.0

It is MIT-licensed with only 2 dependencies and no advisories in the last 24 months. Still, it is native C++ code that parses untrusted images: there was a buffer overflow in 2021, and v3.2.2 fixed memory-safety issues in getImageData/putImageData. The OpenSSF Scorecard is 3.7, with no security policy, no branch protection, no signed releases and no fuzzing.

  • advisories: 2 total (2019 DoS, 2021 buffer overflow), 0 in the last 24 months
  • scorecard score: 3.7; Security-Policy, Branch-Protection, Signed-Releases, Fuzzing and SAST all 0
  • github.com/Automattic/node-canvas/releases: v3.2.2 fixed security issues in getImageData/putImageData
  • npm dependencies / license: 2 deps, MIT

GPT-6.2 Sol: 4.1, likely 2.9 to 5.5

The MIT package has two direct npm dependencies, and its install script downloads a native binary or builds it locally. Both older catalogued advisories were patched, and 3.2.2 shipped additional security fixes. A JPEG decoding memory-safety report against 3.2.3 remains open, with no stable fix identified. Private reporting is now documented, while weak code review, workflow token permissions, and dependency pinning remain concerns in the October Scorecard.

Good

  • It closely follows the browser Canvas 2D API and has 15 years of fixes behind it.
  • It can render to PDF and SVG canvases through Cairo, including PDF links and accessibility tags in 3.1.
  • Version 3 moved to N-API with prebuilds, including arm64 Linux, so fewer installs break when Node changes major versions.
  • Many libraries already integrate with it, with about 38k dependent repos and 4.4k dependent packages.

Bad

  • Builds from source need Cairo, Pango and libjpeg system libraries, which add weight to Docker and Lambda images and cause install failures.
  • In third-party comparisons it is slower than the Skia-based peers.
  • pdf.js replaced it with @napi-rs/canvas because it was hard to install, and its download growth is below the median.
  • Almost all releases come from one maintainer, and the OpenSSF Scorecard is low at 3.7/10.

The numbers

npm downloads, 4 weeks
45M ×2.8 in a year
GitHub stars
11k
Commits, 12 months
86
npm version
3.2.3 Mar 2026
Versions, 12 months
3
Advisories, 24 months
0 of 2 ever
OpenSSF Scorecard
3.7 out of 10, Oct 2026
Licence
MIT

Read on 21 November 2026 from GitHub (Automattic/node-canvas), npm (canvas), OSV and the OpenSSF Scorecard.

Image processing libraries

  1. 9.0sharp
  2. 7.6@napi-rs/canvas
  3. 7.3Satori
  4. 6.8pica
  5. 6.7ImageScript
  6. 5.9resvg-js
  7. 5.3node-canvas
  8. 5.1Jimp
  9. 1.3gm
Compare all 9 on six scores