{"schemaVersion":1,"id":"html-to-image","name":"html-to-image","locale":"en","canonicalUrl":"https://base.akulich.dev/en/library/html-to-image/","officialUrl":"https://github.com/bubkoo/html-to-image","isCatalog":false,"description":"A library for converting DOM into PNG, JPEG, or SVG: it helps export user-created cards and application visual previews.","tasks":["Export a user-created card as an image","Run conversion and check fonts, dimensions, and generated image content"],"categoryIds":["frontend"],"subcategoryIds":["frontend.utilities"],"tags":["html-to-image","web","Development"],"aliases":["bubkoo/html-to-image","html-to-image","html2image","dom-to-image"],"platforms":[],"stack":[],"compatibility":null,"pricing":"free","freeUsage":"Code and local use under MIT.","paidUsage":"Computing resources, self-hosting, and external services are paid for separately if used.","license":"MIT for the code; dependencies have separate licenses.","selectionGuide":{"purpose":"Export a user-created card as an image","chooseWhen":["Export a user-created card as an image","Run conversion and check fonts, dimensions, and generated image content"],"considerInstead":[],"requirements":["The browser must support Promise and SVG foreignObject; the API takes a DOM node and returns a Promise."],"limitations":["Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.","Terms of use: MIT for the code; dependencies have separate licenses.","A tainted canvas may prevent rendering; huge DOM content encounters the dataURI limit. Internet Explorer is unsupported."],"faq":[{"question":"What can you use for free in html-to-image?","answer":"Code and local use under MIT."},{"question":"What additional costs might arise with html-to-image?","answer":"Computing resources, self-hosting, and external services are paid for separately if used."},{"question":"What terms of use matter for html-to-image?","answer":"MIT for the code; dependencies have separate licenses."},{"question":"How do you get started with html-to-image?","answer":"Select the DOM element to convert into PNG, JPEG, or SVG. Run conversion and check fonts, dimensions, and generated image content. Add real data and error handling; check the production build."},{"question":"Why does DOM export sometimes produce blank areas or an error?","answer":"The library clones DOM/styles, loads and embeds fonts/images into an SVG foreignObject, then renders to canvas if needed. Failed image loading without imagePlaceholder leaves a blank area. fontEmbedCSS reuses prepared fonts; filter excludes subtrees but is not called for the root node."}],"related":[],"sources":["https://github.com/bubkoo/html-to-image","https://raw.githubusercontent.com/bubkoo/html-to-image/HEAD/README.md","https://raw.githubusercontent.com/bubkoo/html-to-image/HEAD/LICENSE","https://www.open-source-tools.com/"]},"selectionCheckedAt":null,"applicationGuide":{"goal":"Export a user-created card as an image.","inputs":["Web application source code and the intended workflow.","The project's framework and runtime version."],"steps":["Select the DOM element to convert into PNG, JPEG, or SVG.","Run conversion and check fonts, dimensions, and generated image content.","Add real data and error handling; check the production build."],"checks":["The workflow works after a page refresh and with invalid data.","The bundle, server rendering, and supported browsers suit the project."]},"sources":["https://github.com/bubkoo/html-to-image","https://raw.githubusercontent.com/bubkoo/html-to-image/HEAD/README.md","https://raw.githubusercontent.com/bubkoo/html-to-image/HEAD/LICENSE","https://www.open-source-tools.com/"],"checkedAt":"2026-10-06","reviewScope":"The purpose, current repository license, and separate terms for code, services, and models have been reviewed. The product was not run, and no security audit was performed.","relatedIds":[],"dataVersion":"cbbe7123b47a5ae80983","type":"Web framework / library","kind":"library","pricingNote":"Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.","notes":null,"labeledSources":[{"url":"https://github.com/bubkoo/html-to-image","label":"Official source"},{"url":"https://raw.githubusercontent.com/bubkoo/html-to-image/HEAD/README.md","label":"Official source"},{"url":"https://raw.githubusercontent.com/bubkoo/html-to-image/HEAD/LICENSE","label":"License"},{"url":"https://www.open-source-tools.com/","label":"Catalog / discovery source"}],"licenseGuides":[{"id":"mit","title":"MIT — permissive license","scope":null,"summary":"You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.","url":"https://opensource.org/license/mit"}],"entryIds":[],"composition":null}