Skip to content
JS
Comparison

canvg vs html-to-image

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

JavaScript SVG parser and renderer on Canvas.

$ npm install canvg
html-to-imagev1.11.13, 14 Feb 2025

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

$ npm install html-to-image
Metriccanvghtml-to-imageDifference
Weekly downloads9,748,7974,782,295canvg 2.0x higher
12-month download growth+261%+421%html-to-image +160 pts
Gzip size---
Minified size---
Dependencies50canvg 5 more
Unpacked size1.2 MB308 kBhtml-to-image 4.1x smaller
Latest release4.0.3, 12 Mar 20251.11.13, 14 Feb 2025canvg 27 days more recent
Releases, last 12 months00Same
First published14 Dec 20124 Dec 2017canvg 5.0 years earlier
GitHub stars3,8367,241html-to-image 1.9x higher
Open issues117157html-to-image 40 more
Open pull requests2246html-to-image 24 more
Contributors---
Commits, last 52 weeks822html-to-image 2.8x higher
TypeScript typesBundledBundledSame
Module formatESM + CommonJSESM + CommonJSSame
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 weekhtml-to-image4.8m 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

html-to-image

Major versions
  1. 0.0.14 Dec 2017
  2. 1.1.026 Oct 2020
Last 5 releases
  1. 1.11.1314 Feb 2025
  2. 1.11.1212 Feb 2025
  3. 1.11.111 Feb 2023
  4. 1.11.101 Feb 2023
  5. 1.11.931 Jan 2023
73 releases in total, 0 in the last 12 months
canvg

-

html-to-image

-

canvg

-

html-to-image

-

  • Need no runtime dependencieshtml-to-image (canvg has 5, html-to-image has 0)
  • Module formatBoth ESM + CommonJS
  • Need TypeScript types in the package itselfBoth
  • Node.js version requirementcanvg: >=12.0.0; html-to-image: none declared (engines field in package.json)
  • Need the more recent releasecanvg (4.0.3 on 12 Mar 2025 vs 1.11.13 on 14 Feb 2025)
  • Higher weekly npm downloadscanvg (9.7m vs 4.8m)

Each line is generated from the data above.

Indexability: Indexed.