Jinja2Image
Metrics card with a chart, 1200×675
A 16:9 card for Slack, LinkedIn or X from thirty days of orders: totals, the change on the month before, the busiest day found with sortBy and first, and a Chart.js bar chart styled for a dark background, all computed in the template.
Free plan, no card. You get your own copy in the editor, published and ready for the API.
Change a value, watch the document follow
This is Formfeed’s template engine, running in your browser. Nothing you type is sent or saved.
Loading the engine …

The image as the engine writes it. The API takes a picture of it at this size, as PNG, JPEG or WebP. Shown here on one sheet. The PDF breaks it into pages.
You get your own copy in the editor, with the example’s data. What you changed here stays on this page.
Rendered result
What this example shows
- Thirty rows of daily orders go in; the template sums them to
2,524orders and£214,791.00and divides for the average order,£85.10. - The change on August is computed and rounded in the template,
▲ 13.1%, and turns red with a downward arrow when the month was weaker. days | sortBy('orders', 'desc') | firstfinds the busiest day,Sun 27 Sepwith 126 orders.- The chart is Chart.js with its
optionspassed through, tick and grid colours for the dark card, andrange(1, (days | length) + 1)numbers the days. access: "public"gives a link Slack can fetch for an image block in the team channel.
Helpers used
Template folder
{% set orders = days | sum('orders') %}
{% set revenue = days | sum('revenue') %}
{% set change = ((orders - previous.orders) / previous.orders * 100) | round(1) %}
{% set busiest = days | sortBy('orders', 'desc') | first %}
<main class="card">
<header>
<p class="brand">{{ shop.name }}</p>
<h1>{{ period | date('MMMM yyyy') }} in numbers</h1>
</header>
<section class="kpis">
<div>
<span>Orders</span>
<strong>{{ orders | number(0) }}</strong>
<em class="{{ 'up' if change >= 0 else 'down' }}">{{ '▲' if change >= 0 else '▼' }} {{ change if change >= 0 else -change }}% on {{ previous.label }}</em>
</div>
<div>
<span>Revenue</span>
<strong>{{ revenue | money }}</strong>
<em>{{ (revenue / orders) | money }} per order</em>
</div>
<div>
<span>Busiest day</span>
<strong>{{ busiest.date | date('EEE d MMM') }}</strong>
<em>{{ busiest.orders }} orders</em>
</div>
</section>
{{ chart({
type: 'bar',
labels: range(1, (days | length) + 1),
values: days | pluck('orders'),
color: '#818cf8',
options: {
scales: {
x: { ticks: { color: '#94a3b8', font: { size: 13 } }, grid: { display: false } },
y: { ticks: { color: '#94a3b8', font: { size: 13 } }, grid: { color: 'rgba(148, 163, 184, 0.18)' } }
}
}
}, { width: 1040, height: 290 }) }}
</main>body { margin: 0; }
.card {
box-sizing: border-box;
width: 1200px;
height: 675px;
padding: 52px 80px 40px;
background: #0f172a;
font-family: 'Inter', sans-serif;
color: #f8fafc;
}
header { display: flex; justify-content: space-between; align-items: baseline; }
.brand { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #a5b4fc; }
h1 { margin: 0; font-size: 36px; font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 34px 0 30px; }
.kpis div { padding: 20px 24px; border-radius: 16px; background: #1e293b; }
.kpis span { display: block; font-size: 17px; color: #94a3b8; }
.kpis strong { display: block; margin: 6px 0 4px; font-size: 40px; font-weight: 700; }
.kpis em { font-size: 17px; font-style: normal; color: #94a3b8; }
.kpis em.up { color: #4ade80; }
.kpis em.down { color: #f87171; }
.ff-chart { display: block; }<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap">{
"image": {
"width": 1200,
"height": 675,
"deviceScaleFactor": 1,
"format": "png"
},
"locale": "en-GB",
"timezone": "Europe/London",
"currency": "GBP"
}{
"shop": {
"name": "Fennlor Studio shop"
},
"period": "2026-09-01",
"previous": {
"label": "August",
"orders": 2231
},
"days": [
{
"date": "2026-09-01",
"orders": 64,
"revenue": 5376
},
{
"date": "2026-09-02",
"orders": 71,
"revenue": 5989
},
{
"date": "2026-09-03",
"orders": 69,
"revenue": 5846
},
{
"date": "2026-09-04",
"orders": 83,
"revenue": 7047
},
{
"date": "2026-09-05",
"orders": 104,
"revenue": 8836
},
{
"date": "2026-09-06",
"orders": 112,
"revenue": 9533
},
{
"date": "2026-09-07",
"orders": 58,
"revenue": 5022
},
{
"date": "2026-09-08",
"orders": 66,
"revenue": 5719
},
{
"date": "2026-09-09",
"orders": 73,
"revenue": 6332
},
{
"date": "2026-09-10",
"orders": 70,
"revenue": 5880
},
{
"date": "2026-09-11",
"orders": 88,
"revenue": 7417
},
{
"date": "2026-09-12",
"orders": 109,
"revenue": 9206
},
{
"date": "2026-09-13",
"orders": 117,
"revenue": 9903
},
{
"date": "2026-09-14",
"orders": 61,
"revenue": 5224
},
{
"date": "2026-09-15",
"orders": 68,
"revenue": 5837
},
{
"date": "2026-09-16",
"orders": 75,
"revenue": 6450
},
{
"date": "2026-09-17",
"orders": 72,
"revenue": 6223
},
{
"date": "2026-09-18",
"orders": 91,
"revenue": 7844
},
{
"date": "2026-09-19",
"orders": 113,
"revenue": 9492
},
{
"date": "2026-09-20",
"orders": 121,
"revenue": 10189
},
{
"date": "2026-09-21",
"orders": 63,
"revenue": 5342
},
{
"date": "2026-09-22",
"orders": 70,
"revenue": 5955
},
{
"date": "2026-09-23",
"orders": 77,
"revenue": 6568
},
{
"date": "2026-09-24",
"orders": 74,
"revenue": 6341
},
{
"date": "2026-09-25",
"orders": 94,
"revenue": 8046
},
{
"date": "2026-09-26",
"orders": 118,
"revenue": 10087
},
{
"date": "2026-09-27",
"orders": 126,
"revenue": 10784
},
{
"date": "2026-09-28",
"orders": 66,
"revenue": 5544
},
{
"date": "2026-09-29",
"orders": 72,
"revenue": 6073
},
{
"date": "2026-09-30",
"orders": 79,
"revenue": 6686
}
]
}Render it through the API
Save the sample data as data.json and send it with the template’s name. Each language uses its SDK; curl sends the same JSON to the REST API, as any other language can. Renders with a key that starts with ff_test_ are not metered; on the Free plan they carry a small watermark.
jq '{template: "metrics-card", data: ., output: "png", access: "public"}' data.json \
| curl https://api-eu.formfeed.dev/v1/renders \
-H "Authorization: Bearer ff_test_..." \
-H "Content-Type: application/json" \
--data-binary @-import { Formfeed } from '@formfeed/sdk';
import data from './data.json' with { type: 'json' };
const formfeed = new Formfeed({ apiKey: process.env.FORMFEED_API_KEY! });
const render = await formfeed.renders.create({
template: 'metrics-card',
data,
output: 'png',
access: 'public',
});
console.log(render.status, render.download_url);import json
import os
from formfeed import Formfeed
formfeed = Formfeed(api_key=os.environ["FORMFEED_API_KEY"])
with open("data.json", encoding="utf-8") as file:
data = json.load(file)
render = formfeed.renders.create(
template="metrics-card",
data=data,
output="png",
access="public",
)
print(render.status, render.download_url)<?php
require __DIR__ . '/vendor/autoload.php';
$formfeed = new Formfeed\Client(apiKey: getenv('FORMFEED_API_KEY'));
$render = $formfeed->renders->create([
'template' => 'metrics-card',
'data' => json_decode(file_get_contents('data.json'), true),
'output' => 'png',
'access' => 'public',
]);
echo $render->status, ' ', $render->downloadUrl, PHP_EOL;package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
formfeed "github.com/formfeed-dev/formfeed-go"
)
func main() {
client := formfeed.NewClient(os.Getenv("FORMFEED_API_KEY"))
contents, err := os.ReadFile("data.json")
if err != nil {
log.Fatal(err)
}
var data map[string]any
if err := json.Unmarshal(contents, &data); err != nil {
log.Fatal(err)
}
render, err := client.Renders.Create(context.Background(), formfeed.RenderRequest{
Template: "metrics-card",
Data: data,
Output: "png",
Access: "public",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(render.Status, render.DownloadURL)
}using System.Text.Json;
using Formfeed;
using var formfeed = new FormfeedClient(Environment.GetEnvironmentVariable("FORMFEED_API_KEY"));
var render = await formfeed.Renders.CreateAsync(new RenderRequest
{
Template = "metrics-card",
Data = JsonSerializer.Deserialize<Dictionary<string, object?>>(File.ReadAllText("data.json")),
Output = "png",
Access = "public",
});
Console.WriteLine($"{render.Status} {render.DownloadUrl}");import com.fasterxml.jackson.databind.ObjectMapper;
import dev.formfeed.Formfeed;
import dev.formfeed.RenderRequest;
import java.io.File;
public class Render {
public static void main(String[] args) throws Exception {
var formfeed = Formfeed.builder().apiKey(System.getenv("FORMFEED_API_KEY")).build();
var data = new ObjectMapper().readTree(new File("data.json"));
var request = RenderRequest.template("metrics-card")
.data(data)
.output("png")
.set("access", "public");
var render = formfeed.renders().create(request);
System.out.println(render.getStatus() + " " + render.getDownloadUrl());
}
}require "json"
require "formfeed"
formfeed = Formfeed::Client.new(api_key: ENV.fetch("FORMFEED_API_KEY"))
render = formfeed.renders.create(
template: "metrics-card",
data: JSON.parse(File.read("data.json")),
output: "png",
access: "public"
)
puts "#{render.status} #{render.download_url}"Start rendering today
The free plan includes 100 units a month and free test renders. Change plans when you need more.