{"library":"html-to-image","type":"library","category":null,"description":"html-to-image is a robust JavaScript library designed to convert a given HTML DOM node into various image formats, including PNG, JPEG, SVG, or directly onto an HTML5 canvas element. It serves as an actively maintained and enhanced fork of the earlier `dom-to-image` project, focusing on more maintainable code and improved feature support. The library is currently stable at version 1.11.13, with recent releases indicating a consistent cadence of bug fixes and minor improvements, though major version increments are less frequent. Its key differentiators include comprehensive handling of complex CSS (e.g., `-webkit-mask` support as of v1.11.13), flexibility in output types (data URLs, blobs, or canvas elements), and an emphasis on addressing common pitfalls like iframe cloning and image processing. It is primarily used in browser environments to programmatically capture visual representations of web content for download, display, or further processing.","language":"javascript","status":"active","version":"1.11.13","tags":["javascript","screenshot","capture","canvas","html","dom","image","vector","svg","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install html-to-image","imports":["import * as htmlToImage from 'html-to-image';","import { toPng, toJpeg } from 'html-to-image';","import { toPng, type Options } from 'html-to-image';"]},{"cmd":"yarn add html-to-image","imports":[]},{"cmd":"pnpm add html-to-image","imports":[]}],"homepage":"https://html2image.dev","github":"https://github.com/bubkoo/html-to-image","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/html-to-image","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/html-to-image/compatibility"}}