-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #614 from simonihmig/cloudinary-transformations
Use Record-based API for Cloudinary transformations
- Loading branch information
Showing
6 changed files
with
81 additions
and
20 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,33 @@ | ||
--- | ||
'@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 | ||
// using @resposive-image/cdn | ||
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' }, | ||
], | ||
}); | ||
``` | ||
|
||
```hbs | ||
{{!-- using @responsive-image/ember }} | ||
<ResponsiveImage | ||
@src={{responsiveImageCloudinaryProvider | ||
"foo/bar.jpg" | ||
transformations=(hash co="rgb:20a020" e="colorize:50") | ||
}} | ||
> | ||
``` |
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
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
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
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
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