Elestia Open Source Ratings
7.6

@napi-rs/canvas

A strong pick. 2nd of 9 image processing libraries.

@napi-rs/canvas is a Skia-based Canvas 2D API for Node.js. It installs as prebuilt binaries with no system libraries. Today it is the best choice for drawing images on the server. Pick sharp instead if you only need to resize or convert images.

Best for: Node.js developers who need to draw on a canvas on the server (charts, cards, PDF page rendering) without installing Cairo or other system libraries.

WebsiteGitHubnpm

Scores

Overall7.6

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

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

It is the strongest current pick for drawing on a canvas in Node.js. It installs more easily and runs faster than node-canvas, and it is very actively maintained. pdf.js adopting it shows the ecosystem moving towards it. It is not a general resize and convert tool, where sharp leads. Reliance on one maintainer and few direct dependents keep it below the top of the category.

GPT-6.2 Sol: 8.2, likely 7.1 to 9.1

It is my first pick among these peers for new Node.js projects built around Canvas 2D drawing. Prebuilt Skia binaries, bundled types, active maintenance, and adoption by PDF.js and jsdom support that choice. Sharp is the stronger category default for resize and conversion pipelines. Native deployment and rendering differences account for most of the uncertainty.

Needed by many4.1

How many developers need a tool for this job?

Claude Opus 5.5: 4.0, likely 3.0 to 5.5

Drawing on a canvas on the server is a clear niche inside image processing: OG and social cards, charts, PDF rendering, and bots. Many more developers only need resize and convert, which this tool does not target. Indirect use through pdf.js widens who depends on it.

GPT-6.2 Sol: 4.2, likely 3.0 to 5.5

Server-side drawing serves a clear niche in charts, generated graphics, and document rendering. Node.js is widely used, but the package needs a supported native runtime and the developer survey does not measure how many projects need server-side Canvas 2D.

Helps a lot7.9

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

Claude Opus 5.5: 7.5, likely 6.5 to 8.5

It is a full Canvas 2D implementation on Skia. It adds Path2D, PathKit boolean operations, Lottie rendering, many output formats and good text rendering, and it ships TypeScript types. It does not export SVG and is not multi-threaded the way skia-canvas is. Some APIs differ from node-canvas, such as GlobalFonts and async encode. Independent benchmarks are scarce and conflicting, which keeps the range wide.

GPT-6.2 Sol: 8.3, likely 7.1 to 9.2

Version 1.2.0 offers typed Canvas 2D drawing, detailed font controls, and configurable PNG encoding. Familiar Canvas calls and bundled types give coding agents a good starting point for ordinary drawing tasks. An independent PDF benchmark favored it over node-canvas on two fixtures, but performance evidence is narrow and an open issue documents blur differences from Chrome. Sharp offers more direct control over resize and crop pipelines.

Holds up over time7.5

Will it still be a good choice in two years?

Claude Opus 5.5: 7.0, likely 5.5 to 8.5

Activity is high: 293 commits, 48 GitHub releases and 34 npm versions in the last year, with a push on the day this was read. The ecosystem is moving towards it, since pdf.js switched to it. The main risk is that the work rests on one maintainer who is funded through sponsorship, and the 40 contributors do not change that.

  • github commitsLastYear / releasesLastYear: 293 commits, 48 releases in a year
  • cdn.jsdelivr.net/npm/pdfjs-dist@latest/package.json: pdfjs-dist 6.x lists @napi-rs/canvas ^1.0.13 as an optional dependency
  • github openIssues / closedIssues: 70 open against 276 closed: issues get handled

GPT-6.2 Sol: 8.0, likely 6.7 to 9.0

The project shipped 34 npm versions and made 293 commits in a year, with a reported memory regression fixed within five days. jsdom's switch gives the project another established downstream user. The lead maintainer drives releases and accepts sponsorship, but long-term funding is unclear and minor upgrades have changed rendering behavior.

Used widely5.4

How many use it, and is that growing?

Claude Opus 5.5: 6.0, likely 4.5 to 7.0

Downloads grew from 8.7M to 211M per 4 weeks. That ratio of about 24x is far above the 4.1 median, but most of it comes from pdfjs-dist installing it as an optional dependency. Direct choice is much smaller: 515 dependent repos, against 38,000 for node-canvas. Still, adoption by direct users and by libraries such as pdf-parse and unpdf is clearly rising.

  • npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 210.6M vs 8.7M: about 24x, inflated by pdfjs-dist
  • dependents repos: 515 repos and 102 packages, against node-canvas at 38,000 repos
  • cdn.jsdelivr.net/npm/pdf-parse@2.4.5/package.json: pdf-parse depends on it directly
  • github stars: 2,364 stars, modest for the category

GPT-6.2 Sol: 4.7, likely 3.1 to 6.5

Four-week downloads grew 24.1× year over year, far above the 4.1× catalog median. PDF.js pulls it in as an optional dependency, so that growth is stronger evidence of installation reach than of new projects choosing it directly. The collector found 515 dependent repositories and 102 dependent packages, far behind sharp and node-canvas in tracked repositories. Incomplete coverage and the uncertain share of indirect installs widen the estimate.

  • npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio: 210.6 million versus 8.7 million downloads against a 4.1× median
  • dependents, peers dependentRepos: 515 tracked repositories versus 38,000 for node-canvas and 178,353 for sharp
  • github stars, bluesky posts, peers: 2,364 stars and three Bluesky links show modest public attention
  • github.com/pnpm/pnpm/issues/12853: Confirms pdfjs-dist installs canvas as an optional dependency
  • bellwether.report/npm/pdfjs-dist: The downstream PDF.js package reached 58 million downloads in one November week
Vouched for7.5

Who stands behind it being good?

Claude Opus 5.5: 6.5, likely 5.0 to 7.5

Mozilla's pdf.js choosing it as its Node.js canvas backend is a strong current endorsement. pdf-parse and unpdf build on it as well. Independent write-ups recommend it as the default server canvas. There are no survey data and little independent benchmarking, and almost no Hacker News or Bluesky discussion.

GPT-6.2 Sol: 8.5, likely 7.3 to 9.4

Mozilla's PDF.js uses it for Node.js rendering, jsdom 31 chose it as its optional canvas backend, and Konva supports it for server rendering. An independent benchmark also found it faster than node-canvas for two PDF.js workloads. The integrations establish trust for Canvas 2D, while the benchmark covers a limited set of documents and hardware.

Safe7.2

How safe is it to depend on?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

It has no npm dependencies beyond its platform binaries, no postinstall script, no known advisories and an MIT licence on npm. It is native code wrapping Skia, which is a large C++ attack surface. Some memory leaks were fixed in the past. The Scorecard is 5.1, with zeros for code review, pinned dependencies, token permissions and signed releases.

  • advisories total: 0 advisories ever
  • scorecard score: 5.1; Code-Review, Pinned-Dependencies, Signed-Releases and Token-Permissions are 0
  • npm dependencies / license: 0 dependencies, MIT

GPT-6.2 Sol: 7.4, likely 6.1 to 8.4

The package is MIT-licensed, has no regular npm dependencies, and has zero advisories in the collected OSV data. Its optional platform packages contain Skia and native codecs, adding code beyond the npm dependency count. GitHub Actions publishes the package and attests the binaries, and npm lists two collaborators. The 5.1 OpenSSF Scorecard flags weak code review, token permissions, dependency pinning, and fuzzing, leaving uncertainty about how reliably issues would be caught.

Good

  • It ships prebuilt binaries for many platforms, with no node-gyp, no postinstall scripts and no apt packages, so Docker and serverless setups stay simple.
  • Skia gives good text shaping, emoji and antialiasing, and it encodes to PNG, JPEG, WebP, AVIF and GIF.
  • It is very actively released (48 releases and 293 commits in the last year) and has reached a 1.x version.
  • pdf.js (pdfjs-dist) uses it as its Node.js canvas and DOMMatrix provider, which tests it hard in real use.

Bad

  • It is a canvas drawing API, not an image pipeline. Bulk resizing and format conversion are better done with sharp.
  • Its download count is inflated by pdfjs-dist's optional dependency, and far fewer projects choose it directly than choose node-canvas.
  • Releases depend mostly on one maintainer. The Scorecard gives 0 for code review, pinned dependencies, token permissions and signed releases.
  • It needs native binaries, so it does not run on edge runtimes. Without registered fonts it falls back to a plain built-in font.

The numbers

npm downloads, 4 weeks
211M ×24 in a year
GitHub stars
2.4k
Commits, 12 months
293
npm version
1.2.0 Nov 2026
Versions, 12 months
34
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
5.1 out of 10, Nov 2026
Licence
MIT

Read on 21 November 2026 from GitHub (Brooooooklyn/canvas), npm (@napi-rs/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