-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b9fae9
commit 2d10626
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
'@responsive-image/cdn': major | ||
'@responsive-image/ember': major | ||
--- | ||
|
||
Use Record-based API for cloudinary transformations | ||
|
||
Instead of passing cloudinary transformations as a string according to the Cloudinary Transformation URL API, you need to pass them as an object. If you want to use chained transformations, pass an array of objects. | ||
|
||
```js | ||
const simpleTransformation = cloudinaryProvider('foo/bar.jpg', { | ||
transformations: { co: 'rgb:20a020', e: 'colorize:50' }, | ||
}); | ||
|
||
const chainedTransformation = cloudinaryProvider('foo/bar.jpg', { | ||
transformations: [ | ||
{ co: 'rgb:20a020', e: 'colorize:50' }, | ||
{ ar: '1.0', c: 'fill', w: '150' }, | ||
{ r: 'max' }, | ||
], | ||
}); | ||
``` |