# bubkoo/html-to-image

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

Repository: https://github.com/bubkoo/html-to-image
Canonical: https://ross.abutalabs.com/products/html-to-image
Language: TypeScript
License: MIT
License Family: permissive
Topics: screenshot, canvas, svg, dataurl, image, dom, picture, javascript
Last push: 2026-05-28T05:01:17+00:00

## Health v2 (maintenance only)
Score: 72/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 84, release rhythm 40, longevity 100
- inputs: {"age_days": 3194, "days_push": 97, "days_rel": 566, "gap_med": 1, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7222, forks 675 (observed 2026-08-28T04:09:57.579877+00:00)

## What it is
A TypeScript library that generates images (PNG, JPEG, SVG, blob, canvas, or pixel data) from DOM nodes using HTML5 canvas and SVG foreignObject serialization. It is a maintained fork of dom-to-image with additional features and options like node filtering and embedding.

## Use cases
- export a DOM element as a PNG image
- take a client-side screenshot of a component
- download a rendered chart or card as an image
- convert HTML to a JPEG data URL in the browser
- generate an SVG snapshot of a DOM node
- capture pixel data from rendered HTML

## When to avoid
- you need pixel-perfect full-page screenshots with full CSS support (use Puppeteer or Playwright instead)
- you are rendering in Node.js without a browser DOM
- your content relies on complex CSS features that SVG foreignObject cannot reproduce

## Facets
- artifact type: library
- maturity: stable
- function: image-processing, graphics
- domain: web-development, frontend, image-processing
- platform: browser, cross-platform
- tags: dom-to-image, screenshot, canvas, svg, dataurl, png, jpeg, typescript, nodejs

## Member repositories
- bubkoo/html-to-image (main) score 72

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:57.579877+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:39:48.552459+00:00, confidence not recorded.
  - readme: https://github.com/bubkoo/html-to-image (fetched 2026-08-28T04:09:57.579877+00:00, sha 6ce85af7e47d)
  - registry_npm: https://registry.npmjs.org/html-to-image (fetched 2026-08-29T08:34:52.404716+00:00, sha b55e0e2b1cbd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
