imaginary is a fast HTTP microservice for high-level image processing backed by libvips.
The tool solves the problem of efficiently processing images at scale by wrapping libvips, a C library optimized for image manipulation. It exposes image operations through a simple HTTP API, allowing applications to offload processing to a dedicated service rather than handling it inline. The microservice can read images from HTTP POST payloads, local file paths, or remote HTTP servers, and supports input formats including JPEG, PNG, WEBP, HEIF, and optionally TIFF, PDF, GIF, and SVG. Output is available in JPEG, PNG, and WEBP formats with transparent conversion between them. The service includes optional features such as API token authorization, URL signature protection, HTTP traffic throttling, and CORS support for web clients. It can also return image placeholders on processing errors, ensuring a response is always delivered while reporting error details in response headers.
The tool suits teams building image-heavy applications that need to scale processing independently from their main application logic. It works well for scenarios requiring batch image operations, format conversion, or resizing at high volume. The service is designed for containerized deployment with first-class Docker support and can be deployed to platforms including Fly.io, Cloud Foundry, and Google Cloud Run. Its reliance on libvips rather than ImageMagick or GraphicsMagick offers significant performance advantages, with benchmarks showing libvips typically processes images four to eight times faster while using substantially less memory.
The project maintains active engagement with pull requests and issues, demonstrating responsiveness to community contributions and bug reports. Development activity shows consistent attention to both feature requests and maintenance concerns, with the maintainer addressing questions and feedback across multiple communication channels. The codebase reflects a focus on simplicity and performance, using only Go's native net/http package without additional web frameworks or abstractions.