# html\-to\-image

[BASE product page](<https://base.akulich.dev/en/library/html-to-image/>) · [Resource](<https://github.com/bubkoo/html-to-image>)

ID: html\-to\-image · Language: en
Schema version: 1 · Data version: cbbe7123b47a5ae80983

This is editorial data. An unknown field neither confirms nor rules out a capability.
dataVersion is a dataset fingerprint, not evidence of a recent fact check.

A library for converting DOM into PNG, JPEG, or SVG: it helps export user\-created cards and application visual previews\.

## Type

Web framework / library

## Entry type

library

## Separate catalog

No

## [Access conditions](<https://base.akulich.dev/en/library/html-to-image/#resource-access>)

free

## [What you can use for free](<https://base.akulich.dev/en/library/html-to-image/#resource-access>)

Code and local use under MIT\.

## [Paid features and costs](<https://base.akulich.dev/en/library/html-to-image/#resource-access>)

Computing resources, self\-hosting, and external services are paid for separately if used\.

## [Access and limitations](<https://base.akulich.dev/en/library/html-to-image/#resource-access>)

Code and local use under MIT\. Computing resources, self\-hosting, and external services are paid for separately if used\.

## [Use cases](<https://base.akulich.dev/en/library/html-to-image/#resource-tasks>)

- Export a user\-created card as an image
- Run conversion and check fonts, dimensions, and generated image content

## Category IDs

- frontend

## Subcategory IDs

- frontend\.utilities

## Tags

- html\-to\-image
- web
- Development

## Also known as

- bubkoo/html\-to\-image
- html\-to\-image
- html2image
- dom\-to\-image

## [Selection purpose](<https://base.akulich.dev/en/library/html-to-image/#resource-selection>)

Export a user\-created card as an image

## [Choose this when](<https://base.akulich.dev/en/library/html-to-image/#resource-selection>)

- Export a user\-created card as an image
- Run conversion and check fonts, dimensions, and generated image content

## [Requirements](<https://base.akulich.dev/en/library/html-to-image/#resource-selection>)

- The browser must support Promise and SVG foreignObject; the API takes a DOM node and returns a Promise\.

## [Limitations](<https://base.akulich.dev/en/library/html-to-image/#resource-selection>)

- 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\.

## [Questions before use](<https://base.akulich.dev/en/library/html-to-image/#resource-faq>)

### What can you use for free in html\-to\-image?

Code and local use under MIT\.

### What additional costs might arise with html\-to\-image?

Computing resources, self\-hosting, and external services are paid for separately if used\.

### What terms of use matter for html\-to\-image?

MIT for the code; dependencies have separate licenses\.

### How do you get started with html\-to\-image?

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\.

### Why does DOM export sometimes produce blank areas or an error?

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\.

## Sources for the selection guide

- [https://github\.com/bubkoo/html\-to\-image](<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/README.md>)
- [https://raw\.githubusercontent\.com/bubkoo/html\-to\-image/HEAD/LICENSE](<https://raw.githubusercontent.com/bubkoo/html-to-image/HEAD/LICENSE>)
- [https://www\.open\-source\-tools\.com/](<https://www.open-source-tools.com/>)

## [Possible workflow](<https://base.akulich.dev/en/library/html-to-image/#resource-scenario>)

Export a user\-created card as an image\.

A possible workflow; this is not a report of hands-on testing.

## Before you start

- Web application source code and the intended workflow\.
- The project's framework and runtime version\.

## Steps

1. Select the DOM element to convert into PNG, JPEG, or SVG\.
2. Run conversion and check fonts, dimensions, and generated image content\.
3. Add real data and error handling; check the production build\.

## Check your result

- The workflow works after a page refresh and with invalid data\.
- The bundle, server rendering, and supported browsers suit the project\.

## [License](<https://base.akulich.dev/en/library/html-to-image/#resource-license>)

MIT for the code; dependencies have separate licenses\.

## License explanations for the specified scope

### MIT — permissive license

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\.

[License terms](<https://opensource.org/license/mit>)

## [Sources](<https://base.akulich.dev/en/library/html-to-image/#resource-sources>)

- [Official source](<https://github.com/bubkoo/html-to-image>)
- [Official source](<https://raw.githubusercontent.com/bubkoo/html-to-image/HEAD/README.md>)
- [License](<https://raw.githubusercontent.com/bubkoo/html-to-image/HEAD/LICENSE>)
- [Catalog / discovery source](<https://www.open-source-tools.com/>)

## Editorial review date

2026\-10\-06

## Editorial review scope

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\.

Dates refer to the stated editorial review, not hands-on testing, a product update, or a recent review of all sources.
