node package manager
It’s your turn. Help us improve JavaScript. Take the 2017 JavaScript Ecosystem Survey »



Cloudfiles storage for Imagine.


If you haven't already done so, make sure to install imagine-cloudfiles in your Imagine folder:

$ npm install imagine-cloudfiles

Then place something similar to the following into your config.json file for Imagine:

"storage": "imagine-cloudfiles",
"imagine-cloudfiles": {
  "user": "USER",
  "key": "KEY",
  "containerPrefix": "imagine-assets",
  "containerHashLength": 4

Replace USER and KEY with your Cloudfiles account data.

Container Hashing

In order to sufficiently distribute images across containers in Cloudfiles without user input, Imagine-Cloudfiles places images into containers based on an MD5 hash of the image name that is trimmed to the size of the containerHashLength and prefixed with the containerPrefix. Simply reverse this container hash operation to find which container an image file resides.

containerPrefix and containerHashLength can be changed to meet your needs.

Other Options

You can change the default Cloudfiles host ( by adding the following to the imagine-cloudfiles section of your config:

"host": ""

If you're using Rackspace Cloud Servers, be sure to turn on ServiceNet for fast, unmetered access to Cloudfiles by adding this to the imagine-cloudfiles section of your config:

"servicenet": true


Imagine-Cloudfiles is distributed under the MIT License. See LICENSE for more details.