HTML to Image icon

HTML to Image

Convert HTML string to image (PNG, JPEG, WebP) using Satori - no Chrome required!

Image → Convert to JPEG

AI-generated

Summary

Convert an HTML string with inline styles into a JPEG image with specified width, height, quality, and background color, storing the resulting image in binary form under a user-defined property.

Inputs

  • HTML Content (required) — A string of HTML body content using only inline styles; full HTML documents, external CSS, and CSS pseudo-classes or pseudo-elements are not supported.
  • Width — Width of the output image in pixels (100–4096).
  • Height — Height of the output image in pixels (100–4096).
  • Quality — JPEG image compression quality from 0 to 100.
  • Binary Property Name (required) — The name of the binary property where the output image will be stored.
  • Background Color — Background color applied behind the rendered HTML; accepts transparent, white, hex colors, or rgba values.

Output shape

A single item with original JSON data and a binary property containing the JPEG image.

The output image is generated from the provided HTML body content converted using Satori and Resvg libraries, then encoded as JPEG with specified quality. The binary property containing the image is named per user input. Errors occur if input HTML contains unsupported full document tags, CSS pseudo-elements/classes, or external CSS.

Discussion