Online image manipulation service
See the vigour-config docs for information on how to configure and launch the shutter and where to get more info for all the configuration options.
As a minimum, you will to provide the following configuration options:
convertPath
(IMG_CONVERT_PATH
)identifyPath
(IMG_IDENTIFY_PATH
)brew install ImageMagick
or sudo yum install ImageMagick
/image
(see test/node/post.js
)/image?url=<SOURCE_IMAGE_URL>
(see test/node/get.js
)/invalidate/<any of the above>
: Removes the corresponding image from shutter's cache (both the requested image and the original unmodified download) and from the CloudFront cache if configuredIn all cases, you can use any of the following query string parameters to modifying the behavior:
&width=<INTEGER>
to resize the image to that width, conserving aspect ratio (maximum: 10000)&height=<INTEGER>
to resize the image to that width, conserving aspect ratio (maximum: 10000)&cache=false
if you don't want the resulting image to be cached by the shutter&fallback=<URL>
if you want to provide a fallback image for the cases when requested image can't be downloaded$effect=<EFFECT>
to manipulate the image (see effects below)blur
and overlayBlur
arguments radius
and sigma
(If you ask the shutter for an image it can not find, it will try responding with a fallback image of the same dimensions following this procedure:
&fallback=<URL>
in your query string, the image found at that URL will be downloaded, resized, transformed according to the specified effect (if any) and sent as a fallback image, along with the following extra header: X-Fallback-Type: 'provided'
X-Fallback-Type: 'domain'
X-Fallback-Type: 'default'
fallbacks
property value to the URL of the desired fallback image (example below)fallbacks
property with the key being a domain and the value being a URL (example below)GET /image?url=http://uhohIdontexist.com/returns404.png&width=900&height=600&fallback=http://thankgodIexist.com/img.png
fallbackConfig.json
{
"fallbacks": {
"val": "<DEFAULT_FALLBACK_URL>",
"somedomain.com": "<FALLBACK_URL_FOR_somedomain.com>",
"anotherdomain.com": "<FALLBACK_URL_FOR_anotherdomain.com>"
}
}
Don't forget to merge the config when starting the shutter (see usage)
shutter --mergeFiles '["./fallbackConfig.json"]'
See test/node/post.js and test/node/get.js