truss

Resize, crop, convert, blur, sharpen, and watermark images from the CLI, an HTTP server, or the browser -- written in Rust with signed-URL authentication and SSRF protection built in.
Try the WASM demo in your browser -- no install, no upload, runs 100 % client-side.

Why truss?
- One binary, three interfaces -- the same Rust core powers the CLI, an HTTP image-transform server, and a WASM browser demo.
- Security by default -- signed URLs, SSRF protections, and SVG sanitization are built in.
- Broad format support -- JPEG, PNG, WebP, AVIF, BMP, and SVG; retains EXIF, ICC, and XMP metadata where possible.
- Cross-platform -- Linux, macOS, Windows.
- Tested contracts -- CLI behavior is locked by ShellSpec, HTTP API by runn.
Comparison
Feature comparison with imgproxy and imagor as of March 2026.
| Feature | truss | imgproxy | imagor |
|---|---|---|---|
| Language | Rust | Go | Go |
| Runtime dependencies | None | libvips (C) | libvips (C) |
| CLI | Yes | No | No |
| WASM browser demo | Yes | No | No |
| Signed URLs | Yes | Yes | Yes |
| JPEG / PNG / WebP / AVIF | Yes | Yes | Yes |
| JPEG XL (JXL) | No | Input only | Yes |
| TIFF | Yes | Yes | Yes |
| GIF animation processing | No (out of scope) | Yes | Yes |
| SVG sanitization | Yes | Yes | No |
| Smart crop | No | Yes | Yes |
| Sharpen filter | Yes | Yes | Yes |
| Crop / Trim / Padding | Yes | Yes | Yes |
| S3 | Yes | Yes | Yes |
| GCS | Yes | Yes | Yes |
| Azure Blob Storage | Yes | Yes | No |
| Watermark | Yes | Yes | Yes |
| Prometheus metrics | Yes | Yes | Yes |
| License | MIT | Apache 2.0 | Apache 2.0 |
Architecture
flowchart TB
CLI["CLI<br/>(truss convert)"] --> Core
Server["HTTP Server<br/>(truss serve)"] --> Core
WASM["WASM<br/>(browser)"] --> Core
subgraph Core["Shared Rust core"]
direction LR
Sniff["Detect format"] --> Transform["Crop / resize / blur / sharpen / watermark"]
Transform --> Encode["Encode output"]
end
Server --> Storage
subgraph Storage["Storage backends"]
FS["Local filesystem"]
S3["S3"]
GCS["GCS"]
Azure["Azure Blob"]
end
CLI reads local files or fetches remote URLs directly. The HTTP server resolves images from storage backends or client uploads. The WASM build processes files selected in the browser.
Installation
Prebuilt binaries are available on the GitHub Releases page. See Deployment Guide for details on all targets and Docker images.
Quick Start
CLI
The convert subcommand can be omitted: truss photo.png -o photo.jpg is equivalent to truss convert photo.png -o photo.jpg. Run truss --help to see the full set of options.
# Convert format
# Resize + convert
# Convert from a remote URL
# Sanitize SVG (remove scripts and external references)
# Inspect metadata
Examples: Blur & Watermark
| Original | Gaussian Blur (--blur 5.0) |
Watermark (--watermark) |
|
|---|---|---|---|
![]() |
![]() |
![]() |
# Blur
# Sharpen
# Watermark
Examples: Crop, Rotate & Fit
| Original | Crop (--crop 100,50,400,300) |
Rotate (--rotate 270) |
Fit cover (--fit cover) |
|
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
# Crop a region (x, y, width, height) -- applied before resize
# Rotate 270 degrees clockwise
# Fit into a 300x300 box using cover mode (fills the box, crops excess)
HTTP Server -- one curl to transform
# Start the server
TRUSS_BEARER_TOKEN=changeme
# Resize a local image to 400 px wide WebP in one request
See the API Reference for the full endpoint list and CDN integration guide.
Commands
| Command | Description |
|---|---|
convert |
Convert and transform an image file (can be omitted; see above) |
inspect |
Show metadata (format, dimensions, alpha) of an image |
serve |
Start the HTTP image-transform server (implied when server flags are used at the top level) |
validate |
Validate server configuration without starting the server (useful in CI/CD) |
sign |
Generate a signed public URL for the server |
completions |
Generate shell completion scripts |
version |
Print version information |
help |
Show help for a command (e.g. truss help convert) |
Documentation
| Page | Description |
|---|---|
| Configuration Reference | Environment variables, storage backends, logging, and all server settings |
| API Reference | HTTP endpoints, request/response formats, CDN integration |
| Deployment Guide | Docker, prebuilt binaries, cloud storage (S3/GCS/Azure), production setup |
| Development Guide | Building from source, testing, benchmarks, WASM demo, contributing |
| Prometheus Metrics | Metrics reference, bucket boundaries, example PromQL queries |
| OpenAPI Spec | Machine-readable API specification |
Roadmap
See the public roadmap for planned features and milestones.
Contributing
Contributions are welcome. See CONTRIBUTING.md for details.
- Look for
good first issueto get started. - Report bugs and request features via Issues.
- If the project is useful, starring the repository helps.
- Support via GitHub Sponsors is also welcome.
- Sharing the project on social media or in blog posts is appreciated.
License
Released under the MIT License.





