Takumi is a Rust-based renderer that directly rasterizes to PNG/JPEG/WebP without an SVG intermediate step.
It's designed as a faster alternative to Satori for simple templates, offering 2-10x better performance according to Takumi benchmarks.
# Node.js
pnpm i -D @takumi-rs/core
# Edge runtimes (Cloudflare, Vercel Edge, etc.)
pnpm i -D @takumi-rs/wasm
# Node.js
yarn add -D @takumi-rs/core
# Edge runtimes (Cloudflare, Vercel Edge, etc.)
yarn add -D @takumi-rs/wasm
# Node.js
npm install -D @takumi-rs/core
# Edge runtimes (Cloudflare, Vercel Edge, etc.)
npm install -D @takumi-rs/wasm
export default defineNuxtConfig({
ogImage: {
defaults: {
renderer: 'takumi'
}
}
})
defineOgImage({
renderer: 'takumi'
})
defineOgImageComponent('MyOgImage', {
renderer: 'takumi'
})
tw propTakumi has more CSS limitations than Satori. It works best with simple, solid-color templates.
For the full list of supported CSS properties, see the Takumi documentation.
| Feature | Status | Notes |
|---|---|---|
| Solid background colors | ✅ | bg-gray-900, bg-blue-500 |
| Basic flexbox | ✅ | flex, items-center, justify-center |
| Text colors (solid) | ✅ | text-white, text-gray-500 |
| Font sizes and weights | ✅ | text-6xl, font-bold |
| Rounded corners | ✅ | rounded-lg, rounded-full |
| Emoji | ✅ | Via COLR fonts |
| Images | ✅ | PNG, JPEG, WebP, SVG |
| Padding and margin | ✅ | p-4, m-2, gap-4 |
| Width and height | ✅ | w-full, h-16, w-[200px] |
| Feature | Status | Alternative |
|---|---|---|
| Gradient backgrounds | ❌ | Use solid colors or images |
Opacity colors (/60) | ❌ | Use full opacity colors |
justify-between | ❌ | Use explicit gaps or padding |
flex-1, flex-grow | ❌ | Use fixed widths |
| CSS transforms | ❌ | Pre-transform images |
| Box shadows | ❌ | Use border or images |
Takumi is ideal for:
Consider Satori instead when:
Consider Chromium instead when:
A Takumi-compatible template using only supported features:
<script setup lang="ts">
defineProps<{
title: string
description?: string
}>()
</script>
<template>
<div class="w-full h-full flex flex-col items-center justify-center bg-gray-900 text-white p-12">
<h1 class="text-6xl font-bold mb-4">
{{ title }}
</h1>
<p v-if="description" class="text-2xl text-gray-400">
{{ description }}
</p>
</div>
</template>
Takumi supports both Node.js and WASM runtimes. The module automatically selects the appropriate binding based on your deployment target.
| Environment | Binding | Notes |
|---|---|---|
| Node.js | @takumi-rs/core | Native performance |
| Cloudflare Workers | @takumi-rs/wasm | WASM bundle |
| Vercel Edge | @takumi-rs/wasm | WASM bundle |
| Netlify Edge | @takumi-rs/wasm | WASM bundle |
| AWS Lambda | @takumi-rs/core | Native performance |
See the Renderers overview for more details on runtime support.
If you have Takumi installed but want to disable it for specific environments:
export default defineNuxtConfig({
ogImage: {
compatibility: {
runtime: {
takumi: false
}
}
}
})