|
9 | 9 |
|
10 | 10 | ImageKit Vue.js SDK allows you to use real-time [image resizing](https://docs.imagekit.io/features/image-transformations), [optimization](https://docs.imagekit.io/features/image-optimization), and [file uploading](https://docs.imagekit.io/api-reference/upload-file-api/client-side-file-upload) in client-side.
|
11 | 11 |
|
12 |
| -## Breaking changes - Upgrading from 1.x to 2.x version |
| 12 | +## Breaking changes |
| 13 | + |
| 14 | +### Upgrading from 2.x to 3.x version |
| 15 | + |
| 16 | +1. Overlay syntax update |
| 17 | + |
| 18 | +* In version 3.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. |
| 19 | +* You can migrate to the new layers syntax using the `raw` transformation parameter. |
| 20 | + |
| 21 | +### Upgrading from 1.x to 2.x version |
| 22 | + |
13 | 23 | 2.x version has breaking changes as listed below.
|
14 | 24 |
|
15 | 25 | 1. In version 2.0.1, three global components, namely `ik-image`, `ik-upload`, and `ik-context`, are no longer supported. Instead, it is recommended to import these components individually.
|
@@ -192,6 +202,15 @@ import { IKImage, IKUpload, IKContext, IKVideo, } from 'imagekitio-vue'
|
192 | 202 | :ref={uploadRef}
|
193 | 203 | :onError={onError}
|
194 | 204 | :onSuccess={onSuccess}
|
| 205 | + :transformation="{ |
| 206 | + pre: 'l-text,i-Imagekit,fs-50,l-end', |
| 207 | + post: [ |
| 208 | + { |
| 209 | + type: 'transformation', |
| 210 | + value: 'w-100' |
| 211 | + } |
| 212 | + ] |
| 213 | + }" |
195 | 214 | />
|
196 | 215 | </IKContext>
|
197 | 216 |
|
@@ -376,6 +395,28 @@ For example:
|
376 | 395 | 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
|
377 | 396 | ```
|
378 | 397 |
|
| 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 | +``` |
379 | 420 |
|
380 | 421 | ### List of supported transformations
|
381 | 422 | <details>
|
@@ -410,6 +451,8 @@ https://ik.imagekit.io/your_imagekit_id/tr:h-300,w-400,l-image,i-ik_canvas,bg-FF
|
410 | 451 | | effectUSM | e-usm |
|
411 | 452 | | effectContrast | e-contrast |
|
412 | 453 | | effectGray | e-grayscale |
|
| 454 | +| effectShadow | e-shadow | |
| 455 | +| effectGradient | e-gradient | |
413 | 456 | | original | orig |
|
414 | 457 | | raw | The string provided in raw will be added to the URL as it is. |
|
415 | 458 |
|
@@ -610,6 +653,15 @@ Sample file upload:
|
610 | 653 | :onError="onError"
|
611 | 654 | :onSuccess="onSuccess"
|
612 | 655 | customCoordinates="10,10,100,100"
|
| 656 | + :transformation="{ |
| 657 | + pre: 'l-text,i-Imagekit,fs-50,l-end', |
| 658 | + post: [ |
| 659 | + { |
| 660 | + type: 'transformation', |
| 661 | + value: 'w-100' |
| 662 | + } |
| 663 | + ] |
| 664 | + }" |
613 | 665 | />
|
614 | 666 | </template>
|
615 | 667 |
|
@@ -660,6 +712,15 @@ Example Usage
|
660 | 712 | :onError="onError"
|
661 | 713 | :onSuccess="onSuccess"
|
662 | 714 | customCoordinates="10,10,100,100"
|
| 715 | + :transformation="{ |
| 716 | + pre: 'l-text,i-Imagekit,fs-50,l-end', |
| 717 | + post: [ |
| 718 | + { |
| 719 | + type: 'transformation', |
| 720 | + value: 'w-100' |
| 721 | + } |
| 722 | + ] |
| 723 | + }" |
663 | 724 | />
|
664 | 725 | <button @click="abortChildUpload">Abort Child Upload</button>
|
665 | 726 | </template>
|
|
0 commit comments