Skip to content

Commit 7235ac0

Browse files
Manu ChaudharyManu Chaudhary
authored andcommitted
Adding supported options
1 parent 779a71d commit 7235ac0

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ Include the components in your code:
2222
The library includes 3 Components:
2323
* [IKContext](#IKContext)
2424

25-
* [IKImage - URL generation](#IKImage)
25+
* [IKImage - URL generation](#ikimage---url-generation)
2626

27-
* [IKUpload - File upload](#file-upload)
27+
* [IKUpload - File upload](#ikupload---file-upload)
2828

2929
### IKContext
3030

@@ -71,9 +71,16 @@ The IKImage component component defines an ImageKit Image tag. example usage:
7171
/>
7272
```
7373

74-
`src` is the complete URL that is already mapped to ImageKit.
75-
`path` is the location of the image in the ImageKit cloud. `urlEndpoint` + `path` makes the complete url.
76-
`transformations` is optional. The transformations to be applied to a given image. It is declared in the form of an array of objects, where each object specifies the transformation you need. The values are mentioned below.
74+
#### Supported props:
75+
76+
| Option | Description |
77+
| :----------------| :----------------------------- |
78+
| urlEndpoint | 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 is used. For example, https://ik.imagekit.io/your_imagekit_id/endpoint/ |
79+
| path | Conditional. This is the path at which the image exists. For example, `/path/to/image.jpg`. Either the `path` or `src` parameter need to be specified for URL generation. |
80+
| src | 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 need to be specified for URL generation. |
81+
| transformation | 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. Different steps of a [chained transformation](https://docs.imagekit.io/features/image-transformations/chained-transformations) can be specified as different objects of the array. 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. |
82+
| transformationPostion | 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. |
83+
| queryParameters | 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. |
7784

7885
#### List of supported transformations
7986

0 commit comments

Comments
 (0)