Image optimizer for the Optimus Export Figma plugin — mozjpeg, libwebp and libpng compiled to WebAssembly.
Everything runs in this browser · nothing is uploadedPut this page's address in the plugin's Optimizer field:
…
The plugin loads optimus.js and the codec binaries from here once, then does
every conversion inside Figma. No image data is sent anywhere.
import { optimize } from '…';
const result = await optimize(bytes, { format: 'webp', width: 1600 });
// result: { bytes, mime, format, width, height, quality, inputFormat, inputBytes, steps }
| format | webp (default), jpg, png |
|---|---|
| width | Max width in px. Omit or 0 to keep the source width. Never enlarges. |
| height | Max height in px. Optional; with width it forms a bounding box. |
| maxSizeMB | Size budget. Quality steps down 85 → 10 until it fits. PNG is lossless, so it scales down instead — 10% a step, floor 25%. |