IMPORTANT: You MUST be running Ghost 1.0.0 or later. Previous versions of Ghost do not support external storage solutions.
PLEASE create an issue if you have any problems.
Cloudinary has some "advanced configuration options" for Pro users and etc.. that this module does not currently handle. If you would like support for these options added, please create an issue or submit a PR!
In Ghost's root directory
-
Run
npm install ghost-cloudinary-store(note the lack of--save) -
Make the storage folder if it doesn't already exist
mkdir content/adapters/storage -
Copy
ghost-cloudinary-storefromnode_modulestocontent/adapters/storage
cp -r node_modules/ghost-cloudinary-store content/adapters/storage/ghost-cloudinary-store
- Follow the instructions below for editing config.production.json
Note: The master branch reflects what is published on NPM
-
Navigate to Ghost's
contentdirectory and create a directory calledstorage -
Navigate into this new
storagedirectory and rungit clone https://github.com/sethbrasile/ghost-cloudinary-store.git -
Navigate into
ghost-cloudinary-storeand runnpm install -
Follow the instructions below for editing config.production.json
You have two options for configuring Ghost to work with your Cloudinary account:
- By using your Cloudinary credentials:
cloud_name,api_key, andapi_secret. - By setting a
CLOUDINARY_URLenvironment variable.
In Ghost's config.production.json (the file where you set your URL, mail settings, etc..) as follows:
Note: These values can be obtained from your Cloudinary management console.
"storage": {
"active": "ghost-cloudinary-store",
"ghost-cloudinary-store": {
"cloud_name": "yourCloudName",
"api_key": "yourApiKey",
"api_secret": "yourApiSecret"
}
}Further reading available here.
In Ghost's config.production.json (the file where you set your URL, mail settings, etc..) as follows:
"storage": {
"active": "ghost-cloudinary-store"
}Then set the CLOUDINARY_URL environment variable, available from your Cloudinary management console.
It will look something like CLOUDINARY_URL=cloudinary://874837483274837:a676b67565c6767a6767d6767f676fe1@sample.
Further reading available here.
If you don't know what an environment variable is, read this.
You can find the documentation of what you can configure, directly on the Cloudinary website: http://cloudinary.com/documentation/image_transformations
"storage": {
"active": "ghost-cloudinary-store",
"ghost-cloudinary-store": {
"cloud_name": "yourCloudName",
"api_key": "yourApiKey",
"api_secret": "yourApiSecret",
"configuration": {
"quality": "auto:good",
"secure": "true",
"anything-else": "values"
}
}
}NOTE: The cloud_name, api_key and api_secret environment variables are not needed if you use the CLOUDINARY_URL environment variable.