https://github.com/esbenp/cloudinary-url-resolver
Convert Cloudinary transformations and public ids to Cloudinary resource urls
https://github.com/esbenp/cloudinary-url-resolver
Last synced: 9 months ago
JSON representation
Convert Cloudinary transformations and public ids to Cloudinary resource urls
- Host: GitHub
- URL: https://github.com/esbenp/cloudinary-url-resolver
- Owner: esbenp
- License: mit
- Created: 2015-07-17T07:08:53.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-12-04T09:53:30.000Z (about 3 years ago)
- Last Synced: 2024-10-14T09:29:59.201Z (about 1 year ago)
- Language: JavaScript
- Homepage: http://optimus.rocks/
- Size: 449 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloudinary url resolver
[](https://github.com/esbenp/cloudinary-url-resolver/releases)
[](LICENSE)
[](https://travis-ci.org/esbenp/cloudinary-url-resolver)
[](https://coveralls.io/github/esbenp/cloudinary-url-resolver)
## Installation
```bash
bower install --save cloudinary-url-resolver
```
## Usage
```javascript
resolver.settings.cloud_name = 'awesomecloud';
resolver.settings.secure = false;
console.log(resolver('images/1/1312319103', {
height: 100,
width: 100,
crop: 'fill',
flags: ['keep_iptc', 'attachment']
}));
```
Will return `http://res.cloudinary.com/awesomecloud/image/upload/h_100,w_100,c_fill,fl_keep_iptc.attachment/images/1/1312319103`
## Available settings
[Cloudinary Transformations Reference (go there to see descriptions and possible values)](http://cloudinary.com/documentation/image_transformations#reference)
```javascript
resolver.settings.root = 'http://res.cloudinary.com/';
resolver.settings.secure_root = 'https://res.cloudinary.com/';
resolver.settings.cloud_name = null;
resolver.settings.secure = true;
```
## Available transformations
```
angle
background
border
crop
default_image
density
effect
fetch_format
flags <-- can also be an array of multiple values
gravity
height
opacity
overlay
page
quality
radius
transformation
underlay
width
x
y
```
## Testing
``` bash
$ gulp test
```
## Contributing
Please see [CONTRIBUTING](https://github.com/esbenp/cloudinary-url-resolver/blob/master/CONTRIBUTING.md) for details.
## License
The MIT License (MIT). Please see [License File](https://github.com/esbenp/cloudinary-url-resolver/blob/master/LICENSE) for more information.