@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.
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.
- pkgpulse.com/guides/node-canvas-vs-napi-rs-canvas-vs-skia-canvas-server-2026: Recommended over node-canvas for new server-side canvas work
- github releasesLastYear: 48 releases in a year
- peers sharp: sharp is the default for resize and convert
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.
- github.com/Brooooooklyn/canvas/releases/tag/v1.2.0: Current release improves font matching and PNG encoding controls
- github.com/jsdom/jsdom/releases/tag/v31.0.0: Recent switch from node-canvas with documented rendering differences
- github.com/mozilla/pdf.js/blob/master/src/display/node_utils.js: Established use as the PDF.js Node.js rendering backend
- github.com/n8n-io/n8n/issues/41242: A downstream Docker release omitted the native binary, later fixed
- sharp.pixelplumbing.com/api-resize: Sharp provides a fuller API for resize pipelines
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.
- pkgpulse.com/guides/node-canvas-vs-napi-rs-canvas-vs-skia-canvas-server-2026: Positioned for general server-side canvas work; OG images often go to Satori instead
- peers sharp downloadsLast4Weeks: Resize and convert (sharp) is a much larger need than canvas drawing
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.
- 2025.stateofjs.com/en-US/other-tools/#runtimes: Node.js and browsers are the two leading runtimes among respondents
- github.com/Brooooooklyn/canvas: Node-API package with platform requirements and a separate Lambda setup
- konvajs.org/docs/faq.html: Documents server-side rendering and thumbnail generation
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.
- github.com/Brooooooklyn/canvas: Feature list: formats, Path2D, PathKit, Lottie, text renderers
- pkgpulse.com/guides/node-canvas-vs-napi-rs-canvas-vs-skia-canvas-server-2026: Recommended default; no SVG output, no multi-threading, font fallback caveat
- npm hasTypes: Bundled TypeScript types
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.
- github.com/Brooooooklyn/canvas/releases/tag/v1.2.0: Current font matching, Windows text rendering, and PNG options
- github.com/Brooooooklyn/canvas/blob/v1.2.0/index.d.ts: Typed drawing calls and documented image decoding errors
- pdf-raster.omsimos.com/docs/benchmark: Faster than node-canvas for two PDF.js workloads on one machine
- github.com/Brooooooklyn/canvas/issues/1301: Open report measures remaining blur differences from Chrome
- sharp.pixelplumbing.com/api-resize: Dedicated fit modes, crop strategies, and resampling kernels
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.
- github commitsLastYear, npm versionsLastYear: 293 commits and 34 npm versions in the last year
- github.com/Brooooooklyn/canvas/pull/1347: Merged a fix five days after a report of unbounded drawing memory
- github.com/jsdom/jsdom/releases/tag/v31.0.0: jsdom switched its optional canvas backend from node-canvas
- github.com/sponsors/Brooooooklyn: Lead maintainer accepts sponsorship across several projects
- github.com/Brooooooklyn/canvas/releases/tag/v1.2.0: Lead maintainer signed the tag and documented a font matching change
- github.com/Brooooooklyn/canvas/issues/1149: User reported a breaking TypeScript declaration change after an upgrade
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.
- cdn.jsdelivr.net/npm/pdfjs-dist@latest/package.json: pdf.js depends on it
- cdn.jsdelivr.net/npm/unpdf@1.6.2/package.json: unjs/unpdf uses it as an optional peer dependency
- pkgpulse.com/guides/node-canvas-vs-napi-rs-canvas-vs-skia-canvas-server-2026: Third-party guide recommends it for most new projects
- hackerNews stories / bluesky posts: 0 HN stories and 3 Bluesky posts: little public 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.
- github.com/mozilla/pdf.js/blob/master/src/display/node_utils.js: Mozilla's Node.js canvas factory uses the package directly
- github.com/jsdom/jsdom/releases/tag/v31.0.0: Recent adoption for canvas rendering and image decoding
- konvajs.org/docs/faq.html: Konva documents a dedicated backend
- pdf-raster.omsimos.com/docs/benchmark: Independent comparison on two PDF fixtures
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.
- advisories total, npm dependencies, npm license: Zero package advisories, zero regular dependencies, and MIT licensing
- scorecard score, scorecard checks: 5.1 overall with weak review, workflow permissions, pinning, and fuzzing checks
- npmjs.com/package/%40napi-rs/canvas?activeTab=code: npm lists two package collaborators
- raw.githubusercontent.com/Brooooooklyn/canvas/v1.2.0/.github/workflows/CI.yaml: Release workflow publishes to npm and attests native binaries
- github.com/Brooooooklyn/canvas/releases/expanded_assets/v1.2.0: Release lists native binaries and per-platform software bills of materials
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.