Skip to content

Commit 0747b75

Browse files
committed
Updated readme
1 parent 83c9cf9 commit 0747b75

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -172,36 +172,35 @@ var imageURL = imagekit.url({
172172
| urlEndpoint | String | Optional. The base URL to be appended before the path of the image. If not specified, the URL-endpoint specified at the time of [SDK initialization](#initialization) is used. For example, https://ik.imagekit.io/your_imagekit_id/endpoint/ |
173173
| path | String |Conditional. This is the path at which the image exists. For example, `/path/to/image.jpg`. Either the `path` or `src` parameter needs to be specified for URL generation. |
174174
| src | String |Conditional. This is the complete URL of an image already mapped to ImageKit. For example, `https://ik.imagekit.io/your_imagekit_id/endpoint/path/to/image.jpg`. Either the `path` or `src` parameter needs to be specified for URL generation. |
175-
| transformation | Array of objects |Optional. An array of objects specifying the transformation to be applied in the URL. The transformation name and the value should be specified as a key-value pair in the object. See list of [different tranformations](#list-of-supported-transformations). Different steps of a [chained transformation](https://docs.imagekit.io/features/image-transformations/chained-transformations) can be specified as the array's different objects. The complete list of supported transformations in the SDK and some examples of using them are given later. If you use a transformation name that is not specified in the SDK, it gets applied as it is in the URL. |
176-
| transformationPostion | String |Optional. The default value is `path` that places the transformation string as a path parameter in the URL. It can also be specified as `query` which adds the transformation string as the query parameter `tr` in the URL. If you use `src` parameter to create the URL, then the transformation string is always added as a query parameter. |
175+
| transformation | Array of objects |Optional. An array of objects specifying the transformation to be applied in the URL. The transformation name and the value should be specified as a key-value pair in the object. See list of [different tranformations](#list-of-supported-transformations). Different steps of a [chained transformation](https://docs.imagekit.io/features/image-transformations/chained-transformations) can be specified as the array's different objects. The complete list of supported transformations in the SDK and some examples of using them are given later. If you use a transformation name that is not specified in the SDK, it is applied in the URL as it is. |
176+
| transformationPosition | String |Optional. The default value is `path` that places the transformation string as a URL path parameter. It can also be specified as `query`, which adds the transformation string as the URL's query parameter i.e.`tr`. If you use `src` parameter to create the URL, then the transformation string is always added as a query parameter. |
177177
| queryParameters | Object |Optional. These are the other query parameters that you want to add to the final URL. These can be any query parameters and not necessarily related to ImageKit. Especially useful if you want to add some versioning parameter to your URLs. |
178178
| loading | String |Optional. Pass `lazy` to lazy load images |
179179
| lqip | Object |Optional. You can use this to show a low-quality blurred placeholder while the original image is being loaded e.g. `{active:true, quality: 20, blur: 6`}. The default value of `quality` is `20` and `blur` is `6`.|
180180

181181
### Basic resizing examples
182182

183183
```js
184-
// Image from related file path with no transformations
184+
// Image from related file path with no transformations - https://ik.imagekit.io/your_imagekit_id/default-image.jpg
185185
<ik-image
186186
path="/default-image.jpg"
187187
/>
188188

189-
// Loading imgae from an absolute file path with no transformations
189+
// Image resizing - https://ik.imagekit.io/your_imagekit_id/tr:w-h-300,w-400/default-image.jpg
190190
<ik-image
191-
src="https://custom-domain.com/default-image.jpg"
192-
:transformation="[{height:300,width:400}, {rotation:90}]"
191+
path="/default-image.jpg"
192+
:transformation="[{height:300,width:400}]"
193193
/>
194194

195-
// Image resizing
195+
// Loading imgae from an absolute file path with no transformations - https://www.custom-domain.com/default-image.jpg
196196
<ik-image
197-
path="/default-image.jpg"
198-
:transformation="[{height:300,width:400}]"
197+
src="https://www.custom-domain.com/default-image.jpg"
199198
/>
200199

201-
// Using a new tranformation parameter which is not there in this SDK yet.
200+
// Using a new tranformation parameter which is not there in this SDK yet - https://ik.imagekit.io/your_imagekit_id/tr:custom-value/default-image.jpg
202201
<ik-image
203202
path="/default-image.jpg"
204-
:transformation="[{height:300,width:400, custom: 'value'}, {rotation:90}]"
203+
:transformation="[{custom: 'value'}]"
205204
/>
206205
```
207206

@@ -289,10 +288,10 @@ See the complete list of transformations supported in ImageKit [here](https://do
289288

290289
### Chained Transforms
291290

292-
Chained transforms make it easy to specify the order the transform are applied. For example:
291+
Chained transforms make it easy to specify the order the transform is applied. For example:
293292

294293
```js
295-
// Using chained transformation. First resize and then rotate image to 90 degree.
294+
// Using chained transformation. First, resize and then rotate the image to 90 degrees.
296295
<ik-image
297296
path="/default-image.jpg"
298297
:transformation="[{height:300,width:400}, {rotation:90}]"
@@ -395,7 +394,7 @@ The SDK provides the `ik-upload` component to upload files to the [ImageKit Medi
395394
| isPrivateFile | Boolean | Optional. Accepts `true` of `false`. The default value is `false`. Specify whether to mark the file as private or not. This is only relevant for image type files|
396395
| customCoordinates | String | Optional. Define an important area in the image. This is only relevant for image type files. To be passed as a string with the `x` and `y` coordinates of the top-left corner, and `width` and `height` of the area of interest in format `x,y,width,height`. For example - `10,10,100,100` |
397396
| responseFields | Array of string | Optional. Values of the fields that you want upload API to return in the response. For example, set the value of this field to `["tags", "customCoordinates", "isPrivateFile"]` to get value of `tags`, `customCoordinates`, and `isPrivateFile` in the response. |
398-
| onSuccess | Function callback | Optional. Called if upload is successfull. The first and only argument is the response JOSN from the upload API |
397+
| onSuccess | Function callback | Optional. Called if the upload is successful. The first and only argument is the response JOSN from the upload API |
399398
| onError | Function callback | Optional. Called if upload results in an error. The first and only argument is the error received from the upload API |
400399
| urlEndpoint | String | Optional. If not specified, the URL-endpoint specified at the time of [SDK initialization](#initialization) is used. For example, https://ik.imagekit.io/your_imagekit_id/endpoint/ |
401400
| publicKey | String | Optional. If not specified, the `publicKey` specified at the time of [SDK initialization](#initialization) is used.|

0 commit comments

Comments
 (0)