You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Cloudinary Client Side JavaScript Library - jQuery Plugin<br>`bower` and `npm` repository
4
-
5
-
Cloudinary is a cloud service that offers a solution to a web application's entire image management pipeline.
6
-
7
-
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.
8
-
9
-
Cloudinary offers comprehensive APIs and administration capabilities and is easy to integrate with any web application, existing or new.
10
-
11
-
Cloudinary provides URL and HTTP based APIs that can be easily integrated with any Web development framework.
12
-
13
-
For Javascript, Cloudinary provides a jQuery plugin for simplifying the integration even further.
14
-
15
-
## Getting started guide
16
-
17
-
**Take a look at our [Getting started guide for jQuery](http://cloudinary.com/documentation/jquery_integration#getting_started_guide)**.
1
+
Cloudinary jQuery Plugin
2
+
=======================================
3
+
4
+
## About
5
+
The Cloudinary JQuery Plugin allows you to quickly and easily integrate your application with Cloudinary.
6
+
Effortlessly optimize and transform your cloud's assets.
7
+
8
+
#### Note
9
+
This Readme provides basic installation and usage information.
10
+
For the complete documentation, see the [Javascript SDK Guide](https://cloudinary.com/documentation/jquery_integration).
11
+
12
+
13
+
## Table of Contents
14
+
-[Key Features](#key-features)
15
+
-[Browser Support](#Browser-Support)
16
+
-[Installation](#installation)
17
+
-[Usage](#usage)
18
+
-[Setup](#Setup)
19
+
-[Transform and Optimize Assets](#Transform-and-Optimize-Assets)
20
+
-[Generate Image and HTML Tags](#Generate-Image-and-Video-HTML-Tags)
21
+
-[File upload](#File-upload)
22
+
-[Contributions](#Contributions)
23
+
-[About Cloudinary](#About-Cloudinary)
24
+
-[Additional Resources](#Additional-Resources)
25
+
-[Licence](#Licence)
26
+
27
+
## Key Features
28
+
-[Transform](https://cloudinary.com/documentation/jquery_video_manipulation#video_transformation_examples) and [optimize](https://cloudinary.com/documentation/jquery_image_manipulation#image_optimizations) assets.
29
+
- Generate [image](https://cloudinary.com/documentation/jquery_image_manipulation#deliver_and_transform_images) and [video](https://cloudinary.com/documentation/jquery_video_manipulation#video_element) tags.
30
+
31
+
## Browser Support
32
+
Chrome, Safari, Firefox, IE 11
18
33
19
34
## Installation
35
+
#### Install the package using:
36
+
```bash
37
+
npm install cloudinary-jquery
38
+
```
39
+
Or
40
+
```bash
41
+
yarn add cloudinary-jquery
42
+
```
20
43
21
-
### bower
22
-
23
-
1. Install the files using the following command. Use the optional `--save` parameter if you wish to save the dependency in your bower.json file.
24
-
25
-
```shell
26
-
bower install cloudinary-jquery
27
-
```
28
-
29
-
1. Include the javascript file in your HTML. For Example:
For the server side NPM library, please refer to https://github.com/cloudinary/cloudinary_npm.
51
-
52
-
## Setup
53
-
54
-
In order to properly use this library you have to provide it with a few configuration parameters:
55
-
56
-
Required:
57
-
58
-
*`cloud_name` - The cloudinary cloud name associated with your Cloudinary account.
59
-
60
-
Optional:
61
-
62
-
*`private_cdn`, `secure_distribution`, `cname`, `cdn_subdomain` - Please refer to [Cloudinary Documentation](http://cloudinary.com/documentation/rails_additional_topics#configuration_options) for information on these parameters.
63
-
64
-
To set these configuration parameters use the `Cloudinary::config` function (see below).
65
-
66
-
## Usage
67
-
68
-
The following blog post details the process of setting up a jQuery based file upload.
The Cloudinary JavaScript library API reference can be found at: [https://cloudinary.github.io/pkg-cloudinary-jquery](https://cloudinary.github.io/pkg-cloudinary-jquery)
77
-
78
-
The Cloudinary JavaScript library provides several classes, defined under the "`cloudinary`" domain.
79
-
80
-
#### Configuration
81
-
82
-
Start by instantiating a new Cloudinary class:
52
+
### There are several ways to configure cloudinary-jquery:
`Cloudinary::image()` generates a DOM tag, and prepares it for responsive functionality. This is the same functionality as `$.cloudinary.image()`. (When using the jQuery plugin, the `src-cache` data attribute is stored using jQuery's `data()` method and so is not visible.)
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:
This Cloudinary jQuery plugin is backward compatible with the previous [cloudinary_js](https://github.com/cloudinary/cloudinary_js) version - except that it does not contain the jquery-file-upload dependency and functionality. For a fully compatible version, including the Blueimp jquery file upload functionality, refer to [cloudinary-jquery-file-upload](https://www.github.com/cloudinary/pkg-cloudinary-jquery-file-upload)
221
-
222
-
When loaded, the new JavaScript library instantiates a CloudinaryJQuery object and attaches it to jQuery.
223
-
224
-
The following list includes a sample of the API provided by this library:
225
-
226
-
*`$.cloudinary.config(parameter_name, parameter_value)` - Sets parameter\_name's value to parameter\_value.
227
-
*`$.cloudinary.url(public_id, options)` - Returns a cloudinary URL based on your configuration and the given options.
228
-
*`$.cloudinary.image(public_id, options)` - Returns an HTML image tag for the photo specified by public\_id
229
-
*`$.cloudinary.facebook_profile_image`, `$.cloudinary.twitter_profile_image`, `$.cloudinary.twitter_name_profile_image`, `$.cloudinary.gravatar_image` , `$.cloudinary.fetch_image` - Same as `image` but returns a specific type of image.
230
-
231
-
*`$(jquery_selector).cloudinary(options)` - Goes over the elements specified by the jQuery selector and changes all the images to be fetched using Cloudinary's CDN. Using options, you can also specify transformations to the images.
232
-
The `options` parameters are similar across all cloudinary frameworks. Please refer to [jQuery image manipulation](http://cloudinary.com/documentation/jquery_image_manipulation) for a more complete reference regarding the options.
233
-
234
-
**See [our documentation](http://cloudinary.com/documentation/jquery_image_manipulation) for more information about displaying and transforming images using jQuery**.
235
-
236
-
### Other Cloudinary JavaScript libraries
237
-
238
-
#### Core Javascript library
239
-
The Core Cloudinary JavaScript library does not depend on jQuery: [https://github.com/cloudinary/pkg-cloudinary-core](https://github.com/cloudinary/pkg-cloudinary-core).
240
-
241
-
#### jQuery File upload
242
-
The Cloudinary jQuery File Upload library extends the Cloudinary jQuery plugin with support for the [Blueimp jQuery File Upload library](https://blueimp.github.io/jQuery-File-Upload/).
243
-
The library can be found at [https://github.com/cloudinary/pkg-cloudinary-jquery-file-upload](https://github.com/cloudinary/pkg-cloudinary-jquery-file-upload).
244
-
245
-
## Client side image resizing before upload
246
-
247
-
See the File Processing Options in https://github.com/blueimp/jQuery-File-Upload/wiki/Options.
248
-
Modify your script tags based on the the following example (order is important!):
- Use the ```image()``` function to generate an HTMLImageElement
129
+
- Use the ```imageTag()``` function to generate an ImageTag instance
130
+
- Use the ```video()``` function to generate an HTMLVideoElement
131
+
- Use the ```videoTag()``` function to generate a VideoTag instance
289
132
290
-
## Support
133
+
### File upload
134
+
See [cloudinary-jquery-file-upload](https://github.com/cloudinary/cloudinary_js/tree/master/pkg/cloudinary-jquery-file-upload).
291
135
292
-
You can [open an issue through GitHub](https://github.com/cloudinary/cloudinary_js/issues).
136
+
## Contributions
137
+
- Ensure tests run locally (```npm run test```)
138
+
- Open a PR and ensure Travis tests pass
293
139
294
-
Contact us at [http://cloudinary.com/contact](http://cloudinary.com/contact).
140
+
## Get Help
141
+
If you run into an issue or have a question, you can either:
142
+
-[Open a Github issue](https://github.com/Cloudinary/cloudinary_js/issues) (for issues related to the SDK)
143
+
-[Open a support ticket](https://cloudinary.com/contact) (for issues related to your account)
295
144
296
-
Stay tuned for updates, tips and tutorials: [Blog](http://cloudinary.com/blog), [Twitter](https://twitter.com/cloudinary), [Facebook](http://www.facebook.com/Cloudinary).
145
+
## About Cloudinary
146
+
Cloudinary is a powerful media API for websites and mobile apps alike, Cloudinary enables developers to efficiently manage, transform, optimize, and deliver images and videos through multiple CDNs. Ultimately, viewers enjoy responsive and personalized visual-media experiences—irrespective of the viewing device.
297
147
148
+
## Additional Resources
149
+
-[Cloudinary Transformation and REST API References](https://cloudinary.com/documentation/cloudinary_references): Comprehensive references, including syntax and examples for all SDKs.
150
+
-[MediaJams.dev](https://mediajams.dev/): Bite-size use-case tutorials written by and for Cloudinary Developers
151
+
-[DevJams](https://www.youtube.com/playlist?list=PL8dVGjLA2oMr09amgERARsZyrOz_sPvqw): Cloudinary developer podcasts on YouTube.
-[Code Explorers and Feature Demos](https://cloudinary.com/documentation/code_explorers_demos_index): A one-stop shop for all code explorers, Postman collections, and feature demos found in the docs.
154
+
-[Cloudinary Roadmap](https://cloudinary.com/roadmap): Your chance to follow, vote, or suggest what Cloudinary should develop next.
155
+
-[Cloudinary Facebook Community](https://www.facebook.com/groups/CloudinaryCommunity): Learn from and offer help to other Cloudinary developers.
0 commit comments