Open source
WASM Image Processor
Resize and filter images in the browser using Rust and WebAssembly.
WebAssembly image processing for the browser. Resize, crop, generate thumbnails, and apply filters offline without uploading images to a server.
- The work
- Open source
- The toolkit
- Rust / WebAssembly / wasm-bindgen / Image processing
- Image bytesRead a local file into a Uint8Array
- Rust / WebAssemblyResize, crop, filter, or chain transformations
- Preview / downloadReturn the processed bytes as a Blob
The processing path runs locally, without a server upload.
01 / WASM Image Processor
Why send the image to a server?
If an image is already in the browser, why upload it just to resize it? WASM Image Processor runs those transformations on the device. I wrote the processing code in Rust and exposed it to JavaScript through WebAssembly. That also makes it useful for tools that need to work offline.
02 / WASM Image Processor
The Rust and JavaScript parts
The image crate handles the processing, and wasm-bindgen provides the JavaScript interface. You can resize, crop, make thumbnails, or apply filters such as blur, contrast, brightness, and grayscale. There is also an ImageProcessor builder for chaining operations before calling process() to get the final bytes.
03 / WASM Image Processor
Using it in the browser
The browser side is fairly straightforward. Read the file into a Uint8Array, pass it through the processor, then turn the result into a Blob for preview or download. Your bundler needs to support WebAssembly. Once that is set up, the processing path can stay entirely on the device.
A closer look
Engineering notes
- Browser processing
- WebAssembly handles image transformations locally without server round-trips.
- Offline and private
- Images stay on the device and can be processed without a network connection.
- JavaScript API
- Functions for resizing, cropping, thumbnails, and color adjustments, with documented usage examples.
Keep exploring
More projects
If this one interests you, you might want to look at these too.
Parsel
Test an API without leaving the terminal.
A keyboard-driven terminal HTTP client built in Rust with Ratatui, modal editing, and curl-rest for requests.
Rust / Ratatui / libcurl / TUI
Read the storyTwitter CLI
Tweet from the terminal, then get back to what you were doing.
Twitter CLI lets you tweet without going to Twitter. A productivity improvement for creators.
Rust / CLI / Clap.rs / Twitter API
Read the storyGet in touch
Working on something similar?
If you’d like help with a project or want to discuss something here, hit me up.