Skip to content

imagecodex/imagecloud

Repository files navigation

imagecloud

Go Report Card FOSSA Status

A image process web server with libvips.

中文文档

Features

  • efficient and memory safe with libvips.
  • rich image operations fit all your requirements.
  • support multiple buckets and vendors, like S3、OSS.
  • compatible with OSS image process parameters.
  • POST image process with /rawdata api.

Usage

docker run -itd --name imagecloud -p 8080:8080 imagecodex/imagecloud:main

when docker run successful, send the request to server with x-amz-process or x-oss-process query params.

process params support command chains, for example image/resize,w_100/format,webp means resize and format image to webp.

image process with GET method

curl http://localhost:8080/example.jpg?x-amz-process=image/resize,w_100 -o example_w100.jpg

original image:

original.jpg

resized image:

resize_w100.jpg

image process with POST method

curl -X POST --data-binary "@./pics/01.jpg" 'http://localhost:8080/rawdata?x-amz-process=image/info'

=>

{"format":"jpeg","width":400,"height":267,"pages":1}

Supported operations

The params details please check Aliyun OSS image preocess doc.

  • resize
  • crop
  • watermark
  • quality
  • format
  • info
  • auto-orient
  • circle
  • indexcrop
  • rounded-corners
  • blur
  • rotate
  • interlace
  • average-hue
  • bright
  • sharpen
  • contrast
  • gray

License

FOSSA Status