Skip to content

Commit 8942f95

Browse files
ANKUR DWIVEDIANKUR DWIVEDI
ANKUR DWIVEDI
authored and
ANKUR DWIVEDI
committed
updated readme
1 parent 10aa5a4 commit 8942f95

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,28 @@ For example:
395395
https://ik.imagekit.io/your_imagekit_id/tr:h-300,w-400,l-image,i-ik_canvas,bg-FF0000,w-300,h-100,l-end/img/sample-video.mp4
396396
```
397397
398+
### Arithmetic expressions in transformations
399+
400+
ImageKit allows use of [arithmetic expressions](https://docs.imagekit.io/features/arithmetic-expressions-in-transformations) in certain dimension and position-related parameters, making media transformations more flexible and dynamic.
401+
402+
For example:
403+
404+
```js
405+
<IKImage
406+
path="/default-image.jpg"
407+
urlEndpoint="https://ik.imagekit.io/your_imagekit_id/"
408+
:transformation="[{
409+
"height": "ih_div_2",
410+
"width": "iw_div_4",
411+
"border": "cw_mul_0.05_yellow"
412+
}]"
413+
/>
414+
```
415+
416+
**Sample Result URL**
417+
```
418+
https://ik.imagekit.io/your_imagekit_id/default-image.jpg?tr=w-iw_div_4,h-ih_div_2,b-cw_mul_0.05_yellow
419+
```
398420
399421
### List of supported transformations
400422
<details>

0 commit comments

Comments
 (0)