ℹ️ This is a distribution repository for
npm. The sources for this repository are maintained at the cloudinary_js repository. Please submit issues and pull requests to that repository.
Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline.
Easily upload images to the cloud. Automatically perform smart image resizing, cropping and conversion without installing any complex software. Integrate Facebook or Twitter profile image extraction in a snap, in any dimension and style to match your website’s graphics requirements. Images are seamlessly delivered through a fast CDN, and much much more.
Cloudinary offers comprehensive APIs and administration capabilities and is easy to integrate with any web application, existing or new.
Cloudinary provides URL and HTTP based APIs that can be easily integrated with any Web development framework.
Getting started guide
Install the files using the following command. Use the optional
--saveparameter if you wish to save the dependency in your bower.json file.bower install cloudinary-core
If you do not intend to use
lodashin your own code, you can instead use the shrinkwrap version which includes a subset of the lodash functions. This reduces the loaded code by about 50%!
The following instructions describe the installation of the client-side libraries. For the server side NodeJS library, see https://github.com/cloudinary/cloudinary_npm
Install the files using:npm install cloudinary-core
See comment above regarding the shrinkwrap version.
For the server side NPM library, please refer to https://github.com/cloudinary/cloudinary_npm.
In order to properly use this library you have to provide it with a few configuration parameters:
cloud_name- The cloudinary cloud name associated with your Cloudinary account.
cdn_subdomain- Please refer to Cloudinary Documentation for information on these parameters.
To set these configuration parameters use the
Cloudinary::config function (see below).
The following blog post details the process of setting up a jQuery based file upload. http://cloudinary.com/blog/direct_image_uploads_from_the_browser_to_the_cloud_with_jquery
The Cloudinary Documentation can be found at: http://cloudinary.com/documentation
cloudinary" domain. The reference documentation is located at https://cloudinary.github.io/pkg-cloudinary-core
Start by instantiating a new Cloudinary class:
var cl = cloudinaryCloudinary;
Using the config function
// Using the config functionvar cl = cloudinaryCloudinary;cl;
From meta tags in the current HTML document
When using the library in a browser environment, you can use meta tags to define the configuration options.
init() function is a convenience function that invokes both
For example, add the following to the header tag:
var cl = cloudinaryCloudinary;cl;// orcl;
From environment variables
When using the library in a backend environment such as NodeJS, you can use an environment variable to define the configuration options.
Set the environment variable, for example:
var cl = cloudinaryCloudinary;cl;// orcl;
cl// ""cl// ""
HTML tag generation
You can generate HTML tags in several ways:
Cloudinary::image() generates a DOM tag, and prepares it for responsive functionality. This is the same functionality as
$.cloudinary.image() in the Cloudinary jQuery library.
You can generate an image Tag using the
var tag = cl;tag;
You can also use
var tag = cloudinaryImageTag;tag;
In addition to using a plain object to define transformations or using the builder methods (both described above), you can define transformations by using the Transformation class:
var tr = cloudinaryTransformation;trwidth100;tr// "c_fit,w_100"
You can also chain transformations together:
var tr = cloudinaryTransformation;trwidth10// "c_fit,w_10/a_15"
See our documentation for more information about displaying and transforming images using jQuery.
If you are using jQuery, you can take advantage of the Cloudinary jQuery plugin at https://github.com/cloudinary/pkg-cloudinary-jquery.
jQuery File upload
The Cloudinary jQuery File Upload library extends the Cloudinary jQuery plugin with support for the Blueimp jQuery File Upload library. The library can be found at https://github.com/cloudinary/pkg-cloudinary-jquery-file-upload.
Additional resources are available at:
- Knowledge Base
- Documentation for jQuery integration
- jQuery image upload documentation
- jQuery image manipulation documentation
- Image transformations documentation
You can open an issue through GitHub.
Contact us at http://cloudinary.com/contact.
Released under the MIT license.