# @napi-rs/canvas: 7.6 out of 10

A strong pick. 2nd of 9 in [Image processing libraries](https://elestia.ai/opensource/images/index.md).

@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.

## Scores

- **Overall: 7.6** (likely 6.6 to 8.6)
  - Claude Opus 5.5 (7.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): 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 many: 4.1** (likely 3.0 to 5.5)
  - Claude Opus 5.5 (4.0): 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): 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 lot: 7.9** (likely 6.8 to 8.9)
  - Claude Opus 5.5 (7.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): 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 time: 7.5** (likely 6.1 to 8.8)
  - Claude Opus 5.5 (7.0): 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.
  - GPT-6.2 Sol (8.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 widely: 5.4** (likely 3.8 to 6.8)
  - Claude Opus 5.5 (6.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.
  - GPT-6.2 Sol (4.7): 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.
- **Vouched for: 7.5** (likely 6.2 to 8.5)
  - Claude Opus 5.5 (6.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): 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.
- **Safe: 7.2** (likely 6.1 to 8.2)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (7.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

- Downloads, 4 weeks: 211M
- In a year: ×24
- GitHub stars: 2.4k
- Commits, 12 months: 293
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/Brooooooklyn/canvas
- npm: https://www.npmjs.com/package/@napi-rs/canvas

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
