Skip to content
generated from NezuChan/template

A fast Image proxy service, such as resizing. written in go

License

Notifications You must be signed in to change notification settings

NezuChan/image-proxy

Repository files navigation

Logo

@nezuchan/image-proxy

A fast Image proxy service, such as resizing written in go.

GitHub Discord

Requirements

  • libvips 8.10+
  • C compatible compiler such as gcc 4.6+ or clang 3.0+
  • Go 1.20+

Dependencies for govips

MacOS

Use homebrew to install vips and pkg-config:

brew install vips pkg-config

Ubuntu

You need a recent libvips to work with govips. New govips functionality is continuously added which takes advantage of new libvips functionality. Groovy (20.10) and Hirsute (21.04) repositories have working versions. However on Focal (20.04), you need to install libvips and dependencies from a backports repository:

sudo add-apt-repository -y ppa:strukturag/libde265
sudo add-apt-repository -y ppa:strukturag/libheif
sudo add-apt-repository ppa:tonimelisma/ppa

Then:

sudo apt -y install libvips-dev

Windows

The recommended approach on Windows is to use Govips via WSL and Ubuntu.

If you need to run Govips natively on Windows, it's not difficult but will require some effort.

MacOS note

On MacOS, govips may not compile without first setting an environment variable:

export CGO_CFLAGS_ALLOW="-Xpreprocessor"

Features

  • Secure image routing, this service ideal when you are trying to hide origin request. using aes-256-cbc encryption for encrypting origin url
  • Docker ready
  • Production Ready