Image generation templates

25 pre-built designs. Send JSON, get back a PNG or a PDF, no design work needed.

A template is a named, parameterised image design hosted by html2img. POST a JSON payload to its endpoint, get a PNG back — or a PDF, if you set format to pdf — and the visual design lives on our side so your code only ships data. Each template is tested for a specific shape and resolves at known dimensions.

Use a template when you want a tested image fast. Use the raw HTML endpoint when you need full design control or your data does not fit any template. Many teams mix the two: templates for the 80 percent case, raw HTML for the rest.

Each template render costs 1 credit, the same as a raw HTML render. See /pricing for the credit ladder. Need a custom template that fits your data shape? Email the team through /contact with the design and the fields you want exposed.

Real estate

Templates for property listings, MLS exports and agent branding.

Browse by use case

Selling something online

  • Product Card - E-commerce product cards with price, optional sale price, and CTA
  • Invoice Image - Render full invoices as PNG images or A4 PDFs for emails, dashboards, and exports
  • Receipt Image - Compact order receipts as PNGs for confirmation emails or PDFs for expense filing
  • Coupon Voucher - Promotional voucher images sized for email body and SMS preview

Running a content business

  • Blog Featured Hero - Editorial hero images for blog posts and article pages
  • Open Graph Image - Generate dynamic Open Graph images from JSON
  • Podcast Cover - Square cover artwork sized for Apple Podcasts, Spotify, and the major directories
  • Quote Card - Pull-quote cards for testimonials, reviews, and shareable quotes

Building developer tools

Promoting an event

  • Event Ticket - Print- and email-ready tickets with QR/barcode slot and perforated stub
  • Instagram Story - Vertical 9:16 covers for Instagram and TikTok stories
  • Twitter/X Post Image - Generate share-ready images sized for Twitter/X posts
  • Email Header - Wide email banner artwork sized for newsletter and transactional templates

Templates FAQ

What's the difference between a template and the HTML API?

Templates accept JSON and produce a tested image. The HTML API accepts arbitrary markup. Templates are faster to integrate, the HTML API is more flexible.

Can I customise a template?

Every template accepts inputs that change colors, text and assets. For deeper visual changes, request a custom template through /contact.

How do I get a custom template made?

Send the design (Figma, Sketch or HTML and CSS) and the variable fields you need. We build it into the library and you call a single endpoint.

Are templates the same price as raw HTML?

Yes, both consume 1 credit per render. See /pricing.

Can a template render a PDF instead of a PNG?

Yes. Add "format": "pdf" to the JSON body alongside the template inputs and the response URL points to a PDF document with selectable text. Document-shaped templates like invoices, receipts, certificates and tickets work especially well as PDFs. A PDF render costs the same 1 credit.

Can I see the raw HTML behind a template?

No, templates are hosted on our side so we can keep them tested and consistent. If you need full control, use the HTML API.

What if my data does not fit the template?

Use the HTML API instead with your own markup. Or request a custom template that fits your shape.

Try a template in two minutes

Sign up for a free account, pick a template, send your first JSON payload. 25 free renders every month.