Skip to content

Commit 094c04f

Browse files
ANKUR DWIVEDIANKUR DWIVEDI
authored andcommitted
updated readme
1 parent 878cb29 commit 094c04f

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Upload Python Package
22

33
on:
44
release:
5-
types: [created]
5+
types: [released]
66

77
jobs:
88
deploy:

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ This document presents a list of changes that break the existing functionality o
5757

5858
### Breaking History:
5959

60+
Changes from `3.2.0 -> 4.0.0` are listed below
61+
62+
1. Overlay syntax update
63+
64+
* In version 4.0.0, we've removed the old overlay syntax parameters for transformations, such as `oi`, `ot`, `obg`, and [more](https://docs.imagekit.io/features/image-transformations/overlay). These parameters are deprecated and will start returning errors when used in URLs. Please migrate to the new layers syntax that supports overlay nesting, provides better positional control, and allows more transformations at the layer level. You can start with [examples](https://docs.imagekit.io/features/image-transformations/overlay-using-layers#examples) to learn quickly.
65+
* You can migrate to the new layers syntax using the `raw` transformation parameter.
66+
67+
6068
Changes from `2.2.8 -> 3.0.0` are listed below
6169

6270
1. Throw an Error:
@@ -292,6 +300,29 @@ image_url = imagekit.url({
292300
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
293301
```
294302

303+
**5. Arithmetic expressions in transformations**
304+
305+
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.
306+
307+
For example:
308+
309+
```python
310+
image_url = imagekit.url({
311+
"path": "/default-image.jpg",
312+
"url_endpoint": "https://ik.imagekit.io/your_imagekit_id/endpoint/",
313+
"transformation": [{
314+
"height": "ih_div_2",
315+
"width": "iw_div_4",
316+
"border": "cw_mul_0.05_yellow"
317+
}],
318+
})
319+
```
320+
321+
**Sample Result URL**
322+
```
323+
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
324+
```
325+
295326
**List of transformations**
296327

297328
The complete list of transformations supported and their usage in ImageKit is available [here](https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations).

0 commit comments

Comments
 (0)