GeezerVison is showing github.com — Updated the README file · contentstack/contentstack-php@c3b371d
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: README.md +16-8Lines changed: 16 additions & 8 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -94,16 +94,24 @@ For example, if you want to crop an image (with width as 300 and height as 400), |
94 | 94 |
|
95 | 95 | [Read Image Delivery API documentation](https://www.contentstack.com/docs/apis/image-delivery-api/). |
96 | 96 |
|
97 | | -Following are Image Delivery API examples. |
| 97 | +You can use the Image Delivery API functions in this SDK as well. Here are a few examples of its usage in the SDK. |
98 | 98 |
|
99 | | -// set the quality 100 |
100 | | -$imageUrl = $stack->ImageTrasform($imageUrl, array('quality'=> 100)); |
| 99 | +// set the image quality to 100 |
| 100 | +imageUrl = Stack->imageTransform(imageUrl, array( |
| 101 | +'quality'=> 100 |
| 102 | +)); |
| 103 | + |
| 104 | +// resize the image by specifying width and height |
| 105 | +imageUrl = Stack->imageTransform(imageUrl, array( |
| 106 | +'width'=> 100, |
| 107 | +'height'=> 100 |
| 108 | +)); |
| 109 | + |
| 110 | +// enable auto optimization for the image |
| 111 | +imageUrl = Stack.imageTransform(imageUrl, array( |
| 112 | +'auto'=> 'webp' |
| 113 | +)) |
101 | 114 |
|
102 | | -// set the quality to 100, auto optimization, width and height |
103 | | -$imageUrl = $stack->ImageTrasform($imageUrl, array('quality'=> 100, |
104 | | - 'auto'=> 'webp', |
105 | | - 'width'=> 100, |
106 | | - 'height'=> 100)); |
107 | 115 |
|
108 | 116 |
|
109 | 117 | ### Helpful Links |
|