Skip to content

manaelproxy/manael

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,561 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Manael

GoDoc Go Codecov

Manael is a simple HTTP proxy for processing images.

Installation

Build from source

Building from source requires libvips development headers in addition to Go and Git.

On Debian/Ubuntu:

sudo apt-get install -y libvips-dev

On macOS (Homebrew):

brew install vips

Usage

Start the proxy server:

manael -http=:8080 -upstream_url=http://localhost:9000

To 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.jpg

The response will have Content-Type: image/webp when conversion succeeds.

Note: Manael only converts images for GET requests. HEAD requests (and other HTTP methods) are passed through to the upstream server unchanged. When testing from the command line, use curl -sI -X GET to fetch the headers of a converted image.

License

MIT

About

Manael is a simple HTTP proxy for processing images.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors

Languages