Site icon Golang Libraries, Apps, Golang Jobs and Go Tutorials

A fast and scalable Golang HTTP microservice for high-level image processing

Fast HTTP microservice written in Golang

This Golang Open-Source Project for high-level image processing backed by bimg and libvips. imaginary can be used as a private or public HTTP service for massive image processing with first-class support for Docker & Fly.io. It’s almost dependency-free and only uses net/http native package without additional abstractions for better performance.

Supports multiple image operations exposed as a simple HTTP API, with additional optional features such as API token authorization, URL signature protection, HTTP traffic throttle strategy and CORS support for web clients.

imaginary can read images from HTTP POST payloads, server local path or remote HTTP servers, supporting JPEG, PNG, WEBP, HEIF, and optionally TIFF, PDF, GIF and SVG formats if libvips@8.3+ is compiled with proper library bindings.

imaginary can output images as JPEG, PNG and WEBP formats, including transparent conversion across them.

imaginary optionally supports image placeholder fallback mechanism in case of image processing error or server error of any nature. Hence an image will always be returned by imaginary even in case of error, trying to match the requested image size and format type transparently. The error details will be in the response HTTP header Error field serialized as JSON.

imaginary uses internally libvips, a powerful and efficient library written in C for fast image processing requires a low memory footprint, and it’s typically 4x faster than using the quickest ImageMagick and GraphicsMagick settings or Go native image package. In some cases, it’s even 8x faster-processing JPEG images.

To get started, look at the installation steps, usage cases and API docs.

Supported image operations

Golang and Library Prerequisites

Installation Procedure for the Image Processing Microservice

Exit mobile version