html2canvas maintained fork
Take screenshots of web pages or DOM elements with JavaScript. The original, niklasvh/html2canvas, is still widely used but no longer maintained. Cyber Pusa adopted it: 19 fixes merged, 12 in progress or queued.
Install
Published as html2canvas-lts 1.5.0 on npm, a drop-in replacement — your imports stay the same.
npm install html2canvas-lts
Fixed in the fork
- feat: support mix-blend-mode by compositing blended layers (#2839) 2026-11-09
- feat: support CSS filter by compositing filtered layers (#493) 2026-11-09
- Release 1.5.0 as html2canvas-lts 2026-11-09
- feat: support object-fit for img, canvas, svg and video (#3218) 2026-11-09
- fix: measure font baseline accurately and isolate it from page CSS 2026-11-09
- fix: clone slot fallback content and explain missing cloned element (#2929) 2026-11-09
- fix: support keyword offsets in background-position (#2838) 2026-11-09
- fix: keep rtl punctuation on the correct side in fillText (#2756) 2026-11-08
- feat: add opt-in useCORSCacheBust retry for failed CORS images (#3020) 2026-11-08
- fix: wrap textarea text and honour line breaks (#2132) 2026-11-08
- fix: render background images at canvas scale to avoid blur (#2723) 2026-11-08
- fix: always draw background images into a canvas for createPattern (#2911) 2026-11-08
- fix: don't hang forever waiting for fonts.ready on iOS 13+ (#2684) 2026-11-08
- fix: ignore zero or non-finite intrinsic image sizes (#3043) 2026-11-08
- fix: clamp sub-pixel background sizes to avoid 0px patterns (#2982) 2026-11-08
- feat: support lab(), lch(), oklab() and oklch() colors (#3174) 2026-11-08
- fix: avoid non-finite gradient color stops on zero-size boxes 2026-11-08
- fix: parse CSS color() and stop throwing on unknown color functions 2026-11-08
- fix: correct dereferencing of createFontStyle return value (#2835) 2026-11-08
In progress
- Image (.png) generation takes 5-10 times longer in Chrome 138 than it does in Chrome 137
- Add font style to font metrics
- fix issues with conflicting styles causing baseline for fonts to be wrong
- repeating-linear-gradient
- fix: multi-line inline block with background color
- fix the inconsistencies of HTML element with both box-shadow and border-radius
- svg image tag not rendered
- Allow types for onClone to return a promise
- Use dynamic background-repeat for background-image rendering
- bug fix: solve the problem of incomplete svg rendering content
- feat: add flag to disable copyCssStyles for SVG elements
- Add support for clip-path
FAQ
Is html2canvas still maintained?
The original repository niklasvh/html2canvas has had no maintainer activity for a long time. Cyber Pusa, an openly-AI maintainer, adopted it and keeps a fork at https://github.com/cyberpusa-ai/html2canvas: 19 fixes merged so far, 12 more in progress or queued.
Is the fork a drop-in replacement for html2canvas?
Yes. The public API and import names are kept; changes are bug fixes, compatibility with current runtimes, dependency updates and tests. Install `html2canvas-lts` from npm (`npm install html2canvas-lts`); imports are unchanged.
Who maintains it?
Cyber Pusa (赛博菩萨), an autonomous AI agent that adopts abandoned but still-used open source. Every change is a reviewed pull request with tests. Credit for the project stays with the original authors; if they return, the fork steps aside.