Fast, secure image processing server and Go library, using libvips
APACHE-2.0 License
Bot releases are hidden (Show)
Published by cshum over 2 years ago
Full Changelog: https://github.com/cshum/imagor/compare/v0.8.28...v0.8.29
Published by cshum over 2 years ago
New options for Cache-Control header - stale-while-revalidate
and no-cache
support
-imagor-cache-header-swr duration
Imagor HTTP Cache-Control header stale-while-revalidate for successful image response (default 24h0m0s)
-imagor-cache-header-no-cache
Imagor HTTP Cache-Control header no-cache for successful image response
Full Changelog: https://github.com/cshum/imagor/compare/v0.8.23...v0.8.28
Published by cshum over 2 years ago
focal(AxB:CxD)
Adds a focal region for custom transformation, coordinated by left-top point AxB and right-bottom point CxD.
Also accepts float values between 0 and 1 that represents percentage of image dimensions.
http://localhost:8000/unsafe/200x50/smart/filters:fill(white)/https://raw.githubusercontent.com/cshum/imagor/master/testdata/gopher.png
http://localhost:8000/unsafe/200x50/smart/filters:fill(white):focal(589x401:1000x814)/https://raw.githubusercontent.com/cshum/imagor/master/testdata/gopher.png
http://localhost:8000/unsafe/200x50/smart/filters:fill(white):focal(0.35x0.25:0.6x0.3)/https://raw.githubusercontent.com/cshum/imagor/master/testdata/gopher.png
Full Changelog: https://github.com/cshum/imagor/compare/v0.8.22...v0.8.23
Published by cshum over 2 years ago
max_bytes(amount)
Automatically degrades the quality of the image until the image is under the specified amount
of bytes
Improved memory control using jemalloc
Full Changelog: https://github.com/cshum/imagor/compare/v0.8.20...v0.8.22
Published by cshum over 2 years ago
Imagor Docker now adopts cgif library for GIF Save in libvips , resulting faster export speed and significantly reduced memory usage.
Full Changelog: https://github.com/cshum/imagor/compare/v0.8.18...v0.8.20
Published by cshum over 2 years ago
Imagor now supports generating PDF Thumbnail. Example:
http://localhost:8000/unsafe/fit-in/200x200/filters:fill(cyan)/http://www.africau.edu/images/default/sample.pdf
Configuration may be specified in a .env configuration file and referenced with the -config flag.
PORT=8000
IMAGOR_SECRET=mysecret
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
AWS_REGION=...
imagor -config path/to/config.env
imagor -config path/to/config.env
Full Changelog: https://github.com/cshum/imagor/compare/v0.8.17...v0.8.18
Published by cshum over 2 years ago
Output AVIF format automatically if browser supports, based on Accept
request header check for image/avif
(thanks @lorenries)
-imagor-auto-avif
Output Avif format automatically if browser supports
However AVIF encoder at this stage is very slow and image size is not optimal compare to the WebP counterpart.
Starting from v0.8.17, Imagor Docker image is now available at Github Container Registry with multi-CPU architecture support.
docker run -p 8000:8000 ghcr.io/cshum/imagor:v0.8.17 -imagor-unsafe -imagor-auto-webp
Full Changelog: https://github.com/cshum/imagor/compare/v0.8.16...v0.8.17
Published by cshum over 2 years ago
Output WebP format automatically if browser supports, based on Accept
request header check for image/webp
-imagor-auto-webp
Output WebP format automatically if browser supports
Ability to configure URL for redirection on base path /
-imagor-base-path-redirect string
URL to redirect for Imagor / base path e.g. https://www.google.com
Full Changelog: https://github.com/cshum/imagor/compare/v0.8.15...v0.8.16
Published by cshum over 2 years ago
Imagor now supports Google Cloud Storage for Loader, Storage and Result Storage (thanks @srlk).
version: "3"
services:
imagor:
image: shumc/imagor:latest
volumes:
- ./googlesecret:/etc/secrets/google
environment:
PORT: 8000
IMAGOR_SECRET: mysecret # secret key for URL signature
GOOGLE_APPLICATION_CREDENTIALS: /etc/secrets/google/appcredentials.json # google cloud secrets file
GCLOUD_LOADER_BUCKET: mybucket # enable loader by specifying bucket
GCLOUD_LOADER_BASE_DIR: images # optional
GCLOUD_STORAGE_BUCKET: mybucket # enable storage by specifying bucket
GCLOUD_STORAGE_BASE_DIR: images # optional
GCLOUD_RESULT_STORAGE_BUCKET: mybucket # enable result storage by specifying bucket
GCLOUD_RESULT_STORAGE_BASE_DIR: images/result # optional
GCLOUD_RESULT_STORAGE_ACL: publicRead # optional - see https://cloud.google.com/storage/docs/json_api/v1/objects/insert
ports:
- "8000:8000"
Full Changelog: https://github.com/cshum/imagor/compare/v0.8.12...v0.8.15
Published by cshum over 2 years ago
Imagor now supports cropping image by percentage float params. Useful for cropping image when image size is not known beforehand. (thanks @pletessier )
Example:
http://localhost:8000/unsafe/0.1x0.2:0.8x0.9/filters:fill(cyan)/raw.githubusercontent.com/cshum/imagor/master/testdata/dancing-banana.gif
Full Changelog: https://github.com/cshum/imagor/compare/v0.8.10...v0.8.12
Published by cshum over 2 years ago
New configuration options:
-file-storage-expiration duration
File Storage expiration duration e.g. 24h. Default no expiration
-file-result-storage-expiration duration
File Result Storage expiration duration e.g. 24h. Default no expiration
-s3-storage-expiration duration
S3 Storage expiration duration e.g. 24h. Default no expiration
-s3-result-storage-expiration duration
S3 Result Storage expiration duration e.g. 24h. Default no expiration
Published by cshum over 2 years ago
Example
http://localhost:8000/unsafe/fit-in/200x150/filters:fill(cyan):watermark(raw.githubusercontent.com/cshum/imagor/master/testdata/dancing-banana.gif,repeat,bottom,0,40,40)/raw.githubusercontent.com/cshum/imagor/master/testdata/dancing-banana.gif
Published by cshum over 2 years ago
frames(n[, delay])
set the number of frames to repeat for animation with gif or webp. Otherwise, stack all the frames vertically
n
number of frames to repeatdelay
frames delay in milliseconds, default 100Frames filter allows you to control number of frames and animation speed. It also allows animating a static image in conjunction with a gif watermark. Example:
http://localhost:8000/unsafe/fit-in/200x200/filters:fill(white):frames(8,150):watermark(raw.githubusercontent.com/cshum/imagor/master/testdata/dancing-banana.gif,center,bottom):format(gif)/raw.githubusercontent.com/cshum/imagor/master/testdata/gopher.png
Published by cshum over 2 years ago
GxH:IxJ
Example:
http://localhost:8000/unsafe/300x0/0x20:100x20/filters:fill(yellow):watermark(raw.githubusercontent.com/cshum/imagor/master/testdata/dancing-banana.gif,-30,10,0,50,50):watermark(raw.githubusercontent.com/cshum/imagor/master/testdata/dancing-banana.gif,-10,-10,0,50,50)/raw.githubusercontent.com/cshum/imagor/master/testdata/nyan-cat.gif
Published by cshum over 2 years ago
Imagor is rewritten to support animation for various common operations. The maximum of animated image frames can be configured using cli arguments:
-vips-max-animation-frames int
VIPS maximum of animated image frames to be processed. Set 1 to disable animation, -1 for unlimited. (default -1)
https://raw.githubusercontent.com/cshum/imagor/master/testdata/dancing-banana.gif
http://localhost:8000/unsafe/fit-in/200x150/filters:fill(yellow):watermark(raw.githubusercontent.com/cshum/imagor/master/testdata/gopher-front.png,repeat,bottom,0,40,40)/raw.githubusercontent.com/cshum/imagor/master/testdata/dancing-banana.gif
http://localhost:8000/unsafe/30x40:100x150/filters:fill(cyan)/raw.githubusercontent.com/cshum/imagor/master/testdata/dancing-banana.gif
Published by cshum almost 3 years ago
-http-loader-accept
for setting and validating request Accept headerPublished by cshum almost 3 years ago
Imagor HTTP Loader now added proxy support, which can be configured using cli arguments:
-http-loader-proxy-urls string
HTTP Loader Proxy URLs. Enable HTTP Loader proxy only if this value present. Accept csv of proxy urls e.g. http://user:pass@host:port,http://user:pass@host:port
-http-loader-proxy-allowed-sources string
HTTP Loader Proxy allowed hosts that enable proxy transport, if proxy URLs are set. Accept csv wth glob pattern e.g. *.google.com,*.github.com.
or using environment variables:
HTTP_LOADER_PROXY_URLS=http://user:pass@host:port,http://user:pass@host:port
HTTP_LOADER_PROXY_ALLOWED_SOURCES=*.google.com,*.github.com
Published by cshum almost 3 years ago
Published by cshum almost 3 years ago
Published by cshum almost 3 years ago