n8n HTML to image: your options
To turn HTML into an image in n8n, send it from an HTTP Request node to a service that renders HTML, or run a browser yourself. PostImager does a narrower job and does not accept your HTML. It fills five fixed templates with your fields and returns a PNG, JPG or one-page PDF. If you only wrote HTML to put text on a branded image, a template may save you that work.
If you need your own HTML
Use a service built for it, such as HTML/CSS to Image, or run headless Chromium yourself. You keep full control of the design, and you also take on the layout problems: text that overflows, fonts that fail to load, and images that arrive late.
If you only need text on a branded image
- Create a free key at postimager.com, under API keys.
- In n8n, add a Header Auth credential: name Authorization, value Bearer followed by your key.
- Add an HTTP Request node: method POST, URL https://postimager.com/v1/renders?wait=60, using that credential.
- Send JSON that names a template and maps your fields into variables. The API request tab in the dashboard writes it for you as you edit a template.
- Use output.download.url in the next node.
Why PostImager does not take HTML
Rendering HTML from strangers on a shared service is a security risk, so every template here is written by us, and your values are escaped before they reach the page. Long text shrinks to fit, and you get a warning if it still had to be cut. The cost is flexibility: you cannot change the layout.
Common questions
- Can PostImager render my HTML?
- No. It only fills its five built-in templates, and customer HTML is not on the plan for now.
- Can I use my own fonts or layout?
- No. You choose the template, size, colours, text and photo. If you need your own layout, use an HTML rendering service or a tool with a template editor.
- Do I need a community node?
- No. PostImager works with the HTTP Request node that ships with n8n.