Manael is a simple HTTP proxy for processing images.
Building from source requires libvips development headers in addition to Go and Git.
On Debian/Ubuntu:
sudo apt-get install -y libvips-devOn macOS (Homebrew):
brew install vipsStart the proxy server:
manael -http=:8080 -upstream_url=http://localhost:9000To convert a JPEG image to WebP, send a request with an Accept: image/webp header. Manael will automatically convert the image if the upstream server returns a JPEG or PNG:
curl -sI -X GET -H "Accept: image/webp" http://localhost:8080/image.jpgThe response will have Content-Type: image/webp when conversion succeeds.
Note: Manael only converts images for
GETrequests.HEADrequests (and other HTTP methods) are passed through to the upstream server unchanged. When testing from the command line, usecurl -sI -X GETto fetch the headers of a converted image.