HTML to image (PNG, JPEG or WebP)
html_to_imageHTML to image (PNG, JPEG or WebP). Renders HTML (with inline CSS; fonts and images from the internet are allowed, JavaScript is not executed) into an image. Ideal for social cards, certificates, tickets, OG images or any design you can describe in HTML. Send either html, or template + data to use a ready-made design.
Costs 1 credit per call.
Returns a temporary download link (valid 15 minutes). Always include that link in your reply so the user can open or download the file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Texts for the template, e.g. { "name": "Jane Doe", "course": "n8n basics" } for "certificate". Plain text only: everything is escaped. Fields you leave out keep the example text. | |
| html | No | The HTML to render (max 5 MB). Put the CSS inline or in a <style> tag. Required unless you use template. | |
| lang | No | Language of the example texts of the template. | en |
| width | No | Image width in pixels (100-3840). Default 1200. | |
| format | No | Image format: "png" (lossless, default), "jpeg" or "webp". | png |
| height | No | Image height in pixels (100-2160). Default 630, the standard social-card (Open Graph) proportion. | |
| quality | No | For jpeg and webp. | |
| wait_ms | No | Extra wait before the snapshot. | |
| template | No | Use one of our ready-made designs instead of sending html. Fields, example texts and sizes: https://cofferdock.com/templates.json | |
| full_page | No | Capture the whole content height instead of the viewport. |