Real-time image processing and storage host
Imagine is a real-time image processing and storage host built in
node.js. Usually, image hosts have to download,
transform, and re-serve images as discreet operations. Imagine pools these
tasks and streams the results back as soon as possible using a combination
events.EventEmitter and HTTP
Download the package to a local folder, then run:
$ npm install
You can then start the server (after setting up the config) with:
$ npm start
Uploading images is really easy. Simply name the file and pass in its
Once you've uploaded an image, you can retrieve it later using its name:
Imagine ships with Imagine-Magick to allow basic transformations on an image just by changing its URL. For example:
"storage": "imagine-cloudfiles""imagine-cloudfiles":"user": "USER""key": "KEY""containerPrefix": "imagine-assets""containerHashLength": 4
Imagine was built to be modular and offers simple ways to extend its default configuration to include all types of operations and data stores, tailoring the image host to your specific needs. Look at the Wiki for more information.
You don't want to host an open image server to the world. Neither do we. For
that, Imagine handles
hmac_sha1 shared key signing. If you set a
option in your config,
source requests will only be allowed when the request
is also passed a
sign parameter correspending to the
hmac_sha1 hash of the
source URL and your
signedKey. Like so:
Imagine uses Winston for logging. You can change the default Console implementation by editing the config. For instance, the "File" transport:
"logging":"type": "File""filename": "somefile.log"
Statsd support is also included. To turn it on, add a segment to your config:
"statsd":"host": "xxx""port": 123"prefix": "some.prefix."
Imagine is freely distributed under the MIT License. See LICENSE for more details.