Report lists look empty without a thumbnail, and a report thumbnail generator fills the gap. jsontoimg is the last mile: you already computed MRR, error rate, or “week of Sep 7.” Push those strings (and an optional chart PNG URL) into a template and get a share-card for Slack and email.
Do not make the renderer query your DB
The API will not join warehouses. A cron in your app formats the snapshot, POSTs batches of 50, and writes assetUrl back. If a KPI is missing, fail the job in your code before you call jsontoimg — a blank layer is worse than a skipped thumbnail.
Format the numbers before you send them
The renderer draws strings. It will not round your MRR, pick a currency symbol, or decide whether 0.0847 is a rate or a percentage. Do that in the cron, with Intl.NumberFormat or your language’s equivalent, and send the finished text.
Then decide what a missing value means. A null KPI should fail the job in your code, not render a blank layer in a card that goes to a customer. A zero is a real number and should render as “0”, not as nothing. And watch the width: “$1,284,902” is a lot wider than “$12,849”, so size the box for the biggest number the account could plausibly hit and auto-fit below that.
Slack unfurls and nightly runs
A thumbnail is only useful where it gets seen. Slack needs a publicly reachable URL to unfurl a link into a preview, so store the asset and post the URL rather than attaching bytes. Serve it with a long Cache-Control lifetime — last week’s snapshot is immutable by definition.
Scale is a loop, not a bigger request: 50 tenants per batch, keyed by tenant id, re-rendering only when the snapshot date changes. The batch guide covers pacing and retries for the nightly job.
Related
- OG images
- Email heroes
- Batch image generation
- How JSON-to-image conversion works
- Image automation API guide
FAQ
Where do the KPI numbers come from?
Your warehouse or dashboard API. jsontoimg does not query Stripe or Postgres. Format the numbers, then send them as layer text (and optional chart image URL if you pre-render a sparkline).
Nightly for every tenant?
Batch 50 tenants per request, loop the rest. Store assetUrl next to the report row. Re-render only when the snapshot date changes.
Is this a BI tool?
No. It is a thumbnail factory for a report that already exists.