Dynamic visual social card, leaderboard, profile banner, and Animation Studio powered by React, Satori, Sharp, and Express.
Image Studio provides a full-featured visual creation suite optimized for Discord bots, social share cards, automated media generation, and interactive animated banners.
![]() compact-list |
![]() podium |
![]() versus-duel |
![]() cyber-neon |
![]() glass-minimal |
![]() hacker-terminal |
![]() modern-card |
![]() code-terminal |
![]() neon-cyber |
![]() showcase |
![]() grid |
![]() list |
![]() welcome |
![]() music |
![]() music-neon |
![]() sakura-petals |
![]() cyber-rotation |
![]() cyber-bento-hud |
![]() space-boarding-pass |
![]() vinyl-turntable |
![]() vs-battle-duel |
![]() hacker-terminal |
![]() tcg-hologram |
![]() spark-magic |
- Dynamic 1130px social card generator for playlist and track search results.
- 4 automatic or manual layouts: Auto, List, Grid, and Classic.
- High-res cover art, track numbering, duration, and artist metadata formatting.
- User profile banner showing avatar, rank badge, level progress, XP percentage, and coin balance.
- 4 Distinct Artwork Themes:
ruby-poly: Crimson angular geometric shards, circular glowing avatar, 3D XP bar, Lv badge, and balance.cyber-neon: Cyberpunk Sci-Fi HUD ID card with dual cyan/magenta laser scanners, square tech avatar, telemetry status, and NET_WORTH stats.glass-minimal: Frosted emerald glass aesthetic, glowing matrix telemetry, and sleek rounded level pills.gold-legend: Imperial gold sovereign rank card with laurel filigree, regal golden crown, and imperial ascendancy XP bar.
- Server/guild rank tables displaying top members, customized guild icon, avatars, ranks, and XP values.
- 4 Distinct Layouts:
podium: 3D Olympic podium for Top 3 with imperial gold crown on 1st place, followed by compact rows for subsequent ranks.compact-list: Classic Discord table with π₯π₯π₯ medals, colored level badges, and XP values.cyber-grid: 2-column cyberpunk duel arena cards with neon rank tags and square avatars.minimal-cards: Frosted glass floating cards with percentage progress bar relative to leader.
- Elegant typographic card generator with custom avatar, author, handle, and message quotation.
- 4 Distinct Layouts:
split-portrait: Cinematic split layout with left character portrait fading smoothly into right typography.centered-minimal: Editorial centered typography with glowing gradient avatar ring and watermark.modern-card: Frosted glass card floating on blurred backdrop with verified author badge.neon-cyber: Sci-Fi terminal cyber HUD with corner brackets, audio telemetry bars, and recording indicator.
- Freeform drag-and-drop layer canvas generator (
/custom). - Add and position arbitrary layers: Text, Badges, Avatars, Custom Images, Progress Bars, and Particle Emitters.
- Rich typography styling: custom fonts, line heights, letter spacing, text shadows, and glowing aura.
- Built-in Curated Templates: Instantly switch between curated configurations for Song Search, Profile Cards, Guild Leaderboards, and Quotes.
- Save to Local Storage: Save custom configurations with custom names and notes directly to your browser's persistent storage.
- 1-Click Apply & Management: Load saved presets with a single click, view badge summaries, and remove outdated presets easily.
- Interactive Multi-Track Timeline:
- Timeline Scrubbing: Click and drag across the time ruler (
0ms,300ms,600ms,900ms,1200ms,1500ms...) or track lanes to smoothly scrub the playhead with live frame updates. - Draggable Keyframes: Drag keyframe diamonds horizontally across track lanes to reposition their timing with live playhead feedback.
- Drag-and-Drop Layer Reordering: Drag tracks up and down in either the Timeline column or the Layers sidebar to change layer order (
zIndex) instantly. - Keyframe Easing Curves: Supports
Ease In-Out,Linear,Ease In,Ease Out, andBounceovershoot animations. - Direct Canvas Manipulation: Click any element to select, drag to reposition, and grab corner handles to scale dimensions with live pixel coordinates.
- 7 Built-in Starter Templates: Welcome Card, Cyber Dynamic Entrance, Now Playing Wave, Rank Up / XP, β¨ Spark Magic Banner, πΈ Sakura Petals Anime, and π΅ Music Neon Wave.
- Template Variables: Automatically parse
{userName},{guildName},{userAVTurl}or custom variables inside Text Content and Image URLs, with 1-click insert chips and live preview. - API Payload Inspector (Compact Keyframes): View, edit, and export API JSON payloads in β‘ SiΓͺu ngαΊ―n (Compact Keyframes) format (~50 lines instead of 3,000 lines, reducing payload size by ~98% by defining base canvas + keyframe tracks). Supports unparsed template variables (
{vars}) or resolved values, syntax check, live editor, download.json, cURL generator, and instant test render. - Export Pattern Straight to SDK Package: 1-click export of visual timeline patterns directly into
packages/image-studio/src/patterns/<id>.tswith automatic registry update inpatterns/index.ts, typed TypeScript generation,.tsfile download, and ready-to-run SDK execution snippet (studio.animatePattern(...)). - Particle Effects System: Ambient particles with customizable shapes:
spark(diamond stars),petals(cherry blossoms),snow(snowflakes),fire(flame embers),stars(night cosmos), andmusic(neon notes). - Color Palette & Native Picker: Built-in color picker with curated swatch palette (White, Purple Glow, Violet, Neon Pink, Rose, Amber, Gold, Emerald, Cyan, Blue, etc.) for text, backgrounds, and progress bars.
- Export Options: Export high-quality GIF and Animated WebP with custom FPS (10, 12, 15, 20, 24) and duration, or extract instantaneous single PNG frames.
- Timeline Scrubbing: Click and drag across the time ruler (
All studios support dedicated, shareable, and direct URLs:
/song(or/): Song Search Card Studio/profile: User Profile & Rank Card Studio/leaderboard: Guild Leaderboard Studio/quote: Stylized Quote Card Studio/custom: Custom Freeform Canvas Studio/animation: Multi-track Animation Studio (GIF & WebP)
Supports HTML5 History API, deep linking, browser back/forward navigation, and opening in new tabs.
- Server Counter & Persistence: Every exported image and animation is counted via
POST /api/generatewith an atomic server counter persisted to.app-stats.json. - API Endpoint:
GET /api/statsreturns{ "totalGenerated": number, "lastGeneratedAt": string }. - Live UI Header Badge: Prominently displayed in the top bar with a live pulsing status indicator and synced counter.
- Client Cache: Synchronized with
localStoragefor offline support and immediate client-side count reflection.
- Node.js 22+
- npm (Node Package Manager)
# Clone the repository
git clone https://github.com/zijipia/Image-Studio.git
cd Image-Studio
# Install dependencies
npm install
# Start development server on port 3000
npm run devThe app will run at http://localhost:3000 (or http://0.0.0.0:3000).
# Build the client bundle with Vite
npm run build
# Start production server
npm startAll card and animation generators are backed by a single REST endpoint: POST /api/generate.
Content-Type: application/jsonAccept: image/png(for static cards) orAccept: image/gif/Accept: image/webp(for animations)
curl -X POST http://localhost:3000/api/generate \
-H "Content-Type: application/json" \
-d '{
"type": "song",
"title": "Top Hits 2026",
"layout": "auto",
"items": [
{
"index": 1,
"displayName": "Blinding Lights",
"author": "The Weeknd",
"time": "3:20",
"source": "youtube",
"avatar": "https://images.unsplash.com/photo-1511671782779-c97d3d27a1d4?w=150"
},
{
"index": 2,
"displayName": "Starboy",
"author": "The Weeknd",
"time": "3:50",
"source": "spotify",
"avatar": "https://images.unsplash.com/photo-1470225620780-dba8ba36b745?w=150"
}
]
}' \
--output songs.pngSupports "theme": "ruby-poly" | "cyber-neon" | "glass-minimal" | "gold-legend".
curl -X POST http://localhost:3000/api/generate \
-H "Content-Type: application/json" \
-d '{
"type": "profile",
"data": {
"username": "__ziji",
"rank": "#1",
"level": 42,
"currentXp": 8500,
"requiredXp": 10000,
"balance": "13,080 xu",
"badge": "β
TOP 1 GUILD",
"title": "Ruby Grandmaster",
"avatar": "https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=300",
"theme": "cyber-neon"
}
}' \
--output profile.pngSupports "layout": "podium" | "compact-list" | "cyber-grid" | "minimal-cards".
curl -X POST http://localhost:3000/api/generate \
-H "Content-Type: application/json" \
-d '{
"type": "leaderboard",
"data": {
"guildName": "Celestial Realm",
"season": "SEASON 4",
"layout": "podium",
"guildIcon": "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=150",
"items": [
{ "rank": 1, "username": "Aurelius", "handle": "@aurelius_rex", "avatar": "https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=150", "level": 99, "xp": 94820 },
{ "rank": 2, "username": "Valkyrie", "handle": "@valk_prime", "avatar": "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=150", "level": 88, "xp": 82140 },
{ "rank": 3, "username": "Kage", "handle": "@shadow_blade", "avatar": "https://images.unsplash.com/photo-1517841905240-472988babdf9?w=150", "level": 75, "xp": 67390 }
]
}
}' \
--output leaderboard.pngSupports "layout": "split-portrait" | "centered-minimal" | "modern-card" | "neon-cyber".
curl -X POST http://localhost:3000/api/generate \
-H "Content-Type: application/json" \
-d '{
"type": "quote",
"data": {
"quote": "Stay hungry, stay foolish.",
"author": "Steve Jobs",
"handle": "@stevejobs",
"tag": "Stanford 2005",
"avatar": "https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=500",
"layout": "split-portrait"
}
}' \
--output quote.pngcurl -X POST http://localhost:3000/api/generate \
-H "Content-Type: application/json" \
-d '{
"type": "custom",
"data": {
"title": "Welcome Card",
"width": 930,
"height": 280,
"background": "linear-gradient(135deg, #090614 0%, #1e1035 100%)",
"elements": [
{
"id": "avatar",
"type": "avatar",
"x": 40,
"y": 40,
"width": 140,
"height": 140,
"imageUrl": "https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=300",
"borderRadius": 999
},
{
"id": "title",
"type": "text",
"x": 210,
"y": 60,
"width": 680,
"height": 50,
"content": "Welcome to Image Studio!",
"color": "#ffffff",
"fontSize": 40,
"fontWeight": 700
}
]
}
}' \
--output custom-card.pngExtract a single PNG frame from animation presets via GET (with automatic {userName}, {guildName}, {userAVTurl} replacement):
# Presets: welcome | cyber-rotation | music | rank-up | spark-magic | sakura-petals | music-neon
curl "http://localhost:3000/api/animation/frame?preset=welcome&time=350&userName=Alex&guildName=Legends" \
--output welcome-frame.pngOr render full animated GIF / WebP (Compact Keyframe format):
curl -X POST http://localhost:3000/api/generate \
-H "Content-Type: application/json" \
-H "Accept: image/gif" \
-d '{
"type": "animated",
"data": {
"title": "Welcome Animation",
"format": "gif",
"duration": 1500,
"fps": 12,
"loop": 0,
"canvas": {
"title": "Welcome Card",
"width": 930,
"height": 280,
"background": "#090614",
"elements": [
{ "id": "avatar", "type": "avatar", "x": 36, "y": 40, "width": 140, "height": 140, "imageUrl": "https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=300" },
{ "id": "title", "type": "text", "x": 205, "y": 55, "width": 650, "height": 52, "content": "Welcome, Adventurer!", "color": "#ffffff", "fontSize": 44, "fontWeight": 700 }
]
},
"tracks": [
{
"elementId": "avatar",
"keyframes": [
{ "time": 0, "scaleX": 0.2, "scaleY": 0.2, "opacity": 0 },
{ "time": 600, "scaleX": 1.0, "scaleY": 1.0, "opacity": 1, "easing": "bounce" }
]
}
]
}
}' \
--output animated-welcome.gifπ‘ Tip: All card endpoints (
song,profile,leaderboard,quote) accept an optional"particleConfig": { "preset": "spark" | "petals" | "snow" | "fire" | "stars" | "music" }object for animated ambient particles.
π Full API Reference: Check out
docs/api.mdfor complete schemas, response headers, Python, Node.js, and Discord bot integration examples.
- Frontend: React 19, TypeScript, Tailwind CSS v4, Lucide Icons, Vite.
- Rendering Engine: Satori (JSX/HTML-to-SVG conversion) + Sharp (high-speed SVG-to-PNG / multi-frame GIF & WebP encoding).
- Backend API: Express 4 server with streaming binary responses.
- International Typography: Dynamic Google Fonts unicode asset loader supporting Vietnamese, CJK (Japanese, Korean, Chinese), Cyrillic, Thai, Arabic, Devanagari, and Latin Extended.
Image Studio supports 1-click deployment across all major hosting platforms:
- Zero-config deployment: Connected automatically via
vercel.json. - API Functions: Node.js Serverless Functions in
api/generate.ts,api/animation/frame.ts, andapi/stats.ts. - Bundled Fonts & WASM:
vercel.jsonautomatically includes HarfBuzz & Satori Yoga WASM +public/fonts/**. - Build Command:
npm run build| Output Directory:dist
- Configuration: Powered by
netlify.toml. - Functions: Located in
netlify/functions/(generate.ts,frame.ts,stats.ts). - Native Addon Bundling: Sharp is marked as external with
esbuild, and font assets + WASM files are packaged automatically. - SPA Rewrites: Redirects
/api/*to functions and/*toindex.htmlfor client routing. - Build Command:
npm run build| Publish Directory:dist
- Static Assets & SPA Routing:
public/_redirectsensures seamless SPA client routing (/* /index.html 200), andpublic/_headersoptimizes cache policies for fonts and images. - Edge Function Routing:
public/_routes.jsonlimits function executions to/api/*, leaving static assets on Cloudflare's global edge cache. - Sharp/Backend Integration: Cloudflare Workers/Pages run on V8 isolates (without native C++ Sharp). You can either:
- Set environment variable
BACKEND_API_URL(orVITE_API_URL) in Cloudflare Pages dashboard pointing to your Vercel, Netlify, or VPS deployment βfunctions/api/[[path]].tswill transparently reverse-proxy all/api/*requests with no CORS issues. - Or configure
public/_redirectsto proxy/api/*directly to your API server.
- Set environment variable
- Build Command:
npm run build| Build Output Directory:dist
MIT License. Open source and ready for bot integrations and production workflows.
/api/generate, /api/animation/frame and /api/stats now run natively on Cloudflare (no proxy to Vercel/Netlify needed).
The same generators run on every host through a small runtime adapter (src/lib/runtime.ts):
| Host | Runtime adapter | Rasteriser / GIF |
|---|---|---|
| Vercel, Netlify, Express/VPS | src/lib/runtime-node.ts |
sharp |
| Cloudflare Workers | src/worker/runtime-worker.ts |
resvg-wasm + gifenc |
Deploy: Build command npm run build, deploy command npx wrangler deploy (or npm run cf:deploy). Local: npm run cf:dev.
Notes / limits on Cloudflare:
- Needs the Workers Paid plan (rendering uses far more than the free 10 ms CPU).
- Animated WebP is not available (HTTP 501) β use
format: "gif". Animated GIF, single PNG frames and all card types work. - Avatars / backgrounds must be PNG, JPEG or GIF (WebP/AVIF avatars fall back to the placeholder). No server-side resize/crop.
/api/statscounter is per isolate (in-memory).- Optional proxy mode:
API_MODE=proxy+BACKEND_API_URL=.... - Smoke test any deployment:
npx tsx scripts/smoke-http.ts https://your-site.
packages/image-studio is the typed SDK (image-studio) with retries, fail-over between hosts (e.g. Cloudflare β Vercel), typed errors, built-in & exported patterns (studio.animatePattern("welcome")), and helpers for discord.js / Workers.
Server and SDK share one HTTP contract (src/server/contract.ts): JSON errors with a code, size/timing headers, and capabilities in GET /api/stats.
Checks: npm run typecheck (type-level drift guard), npm run sdk:test, npm run smoke:handlers.























