Skip to content
JS
Comparison

canvg vs dom-to-image

Image processingPackage data 25 Sept 2026
canvgv4.0.3, 12 Mar 2025

JavaScript SVG parser and renderer on Canvas.

$ npm install canvg
dom-to-imagev2.6.0, 4 Oct 2017

Generates an image from a DOM node using HTML5 canvas and SVG

$ npm install dom-to-image
Metriccanvgdom-to-imageDifference
Weekly downloads9,748,797227,866canvg 42.8x higher
12-month download growth+261%+17%canvg +244 pts
Gzip size---
Minified size---
Dependencies50canvg 5 more
Unpacked size1.2 MB--
Latest release4.0.3, 12 Mar 20252.6.0, 4 Oct 2017canvg 7.4 years more recent
Releases, last 12 months0--
First published14 Dec 2012--
GitHub stars3,83610,780dom-to-image 2.8x higher
Open issues117283dom-to-image 166 more
Open pull requests2255dom-to-image 33 more
Contributors---
Commits, last 52 weeks80canvg higher
TypeScript typesBundledNoneDiffers
Module formatESM + CommonJSCommonJSDiffers
Runtimes---
LicenseMITMITSame

Green marks the smaller size or the more recent release. Bold marks the higher count, with no judgement implied. Sizes are for the whole package per Bundlephobia. Growth compares the average of the last 4 weeks with the first 4 weeks of the 52-week series.

canvg9.7m latest weekdom-to-image227.9k latest week
Week of 23 Sept 2025Week of 15 Sept 2026
Weekly npm downloads, 52 weeks. Y axis starts at zero. Values are not smoothed.

canvg

Major versions
  1. 0.0.114 Dec 2012
  2. 1.0.09 Mar 2018
  3. 2.0.018 May 2019
  4. 3.0.04 Dec 2019
  5. 4.0.017 Feb 2022
Last 5 releases
  1. 3.0.1113 Mar 2025
  2. 4.0.312 Mar 2025
  3. 4.0.222 Apr 2024
  4. 4.0.119 Jul 2022
  5. 4.0.017 Feb 2022
28 releases in total, 0 in the last 12 months

dom-to-image

Major versions
  1. -
Last 5 releases
  1. -
Release count not fetched
canvg

-

dom-to-image

-

canvg

-

dom-to-image

-

  • Need no runtime dependenciesdom-to-image (canvg has 5, dom-to-image has 0)
  • Need both ESM and CommonJS entry pointscanvg (canvg: ESM + CommonJS; dom-to-image: CommonJS)
  • Need to load it with require()Both
  • Need TypeScript types in the package itselfcanvg (canvg: Bundled; dom-to-image: None)
  • Node.js version requirementcanvg: >=12.0.0; dom-to-image: none declared (engines field in package.json)
  • Need the more recent releasecanvg (4.0.3 on 12 Mar 2025 vs 2.6.0 on 4 Oct 2017)
  • Higher weekly npm downloadscanvg (9.7m vs 227.9k)

Each line is generated from the data above.

Indexability: Indexed.