HTML to Image icon

HTML to Image

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

Image → Convert to PNG

AI-generated

Summary

Convert an HTML string with inline styles into a PNG image of specified dimensions and background color, storing the resulting image in a binary property.

Inputs

  • HTML Content (required) — HTML string with inline styles only (style="..."), representing the image content. Full HTML documents, external CSS, and pseudo-classes/elements are not supported.
  • Width — Width of the output image in pixels (min 100, max 4096). Defaults to 1200.
  • Height — Height of the output image in pixels (min 100, max 4096). Defaults to 630.
  • Background Color — Background color of the output image (e.g., transparent, white, #RRGGBB, or rgba(r,g,b,a)). Defaults to transparent.
  • Binary Property Name (required) — The name of the binary property on the output item where the PNG image data will be stored. Defaults to 'data'.

Output shape

Each input item produces one output item containing the original JSON plus a binary property with the PNG image data.

The HTML content must only include inline styles and disallow full HTML documents, external stylesheets, style tags, JS, pseudo-classes (:hover, :active, etc.) and pseudo-elements (::before, ::after). The image is generated losslessly as PNG with transparency support. Errors in HTML or unsupported features will cause node execution to fail unless Continue On Fail is enabled.

Discussion