Skip to main content

wasm-html-to-image

High-Performance HTML to Image & Image Optimization Engine

⚑

Single Unified WASM Module

Combines Satoru (HTML layout & rendering) and wasm-image-optimization (image conversion & encoding) into a single Emscripten binary, minimizing memory and overhead.

🎨

Versatile Input & Output Formats

Accepts HTML strings, URLs, or raw image buffers. Generates SVG, PNG, JPEG, WebP, AVIF, RAW, ThumbHash, and multi-page PDF files with ease.

πŸš€

Zero-Config Single Bundle

Import wasm-html-to-image/single and call render() immediately without worrying about WASM asset paths or manual initialization.

🌐

Cloudflare Workers & Edge Ready

Dedicated workerd and edge-light exports enable fast, lightweight OGP and banner generation even in constrained serverless edge runtimes.

🧡

Multi-Threaded Worker Pool

Built-in wasm-html-to-image/workers support provides parallel batch processing across Node.js worker threads and Web Workers without blocking the main event loop.

βš›οΈ

React, Preact & Tailwind Integration

Render React / Preact JSX components directly and apply modern utility-first CSS layouts using the integrated UnoCSS/Tailwind pipeline.