Bun.Image: A zero-dependency native image processing pipeline for Bun runtime
By
chakintosh
8d ago· 5 min readenNews
80/100
Golden Brown
Bagelometer↗
Front-window bakery material. Catches the eye, delivers the goods.
Score80TypenewsSentimentpositive
Summary
Bun.Image is a chainable image processing pipeline built into the Bun runtime that can decode, resize, rotate, and re-encode multiple image formats (JPEG, PNG, WebP, HEIC, AVIF). It is built on libjpeg-turbo, spng, libwebp, and SIMD geometry kernels, with zero npm dependencies and no native addon build step. The API is modeled after Sharp, using a lazy evaluation pattern where transforms are chained and execution only happens when a terminal method is awaited.
Key quotes
· 3 pulledBun.Image is a chainable image pipeline for decoding, resizing, rotating, and re-encoding JPEG, PNG, WebP, HEIC, and AVIF — built on libjpeg-turbo, spng, libwebp, and SIMD geometry kernels, with zero npm dependencies and no native addon build step.
The API is shaped after Sharp: construct from an input, chain transforms, pick an output format, then await a terminal method.
Nothing runs until the terminal is awaited, and the work executes in native code.
Decode, transform, and encode images with a fast native pipeline
