@@ -45,8 +45,8 @@ var imageURL = imagekit.url({
45
45
path : "/default-image.jpg",
46
46
urlEndpoint : "https://ik.imagekit.io/your_imagekit_id/endpoint/",
47
47
transformation : [{
48
- "HEIGHT " : "300",
49
- "WIDTH " : "400"
48
+ "height " : "300",
49
+ "width " : "400"
50
50
}]
51
51
});
52
52
```
@@ -66,8 +66,8 @@ This method allows you to add transformation parameters to an existing, complete
66
66
var imageURL = imagekit.url({
67
67
src : "https://ik.imagekit.io/your_imagekit_id/endpoint/default-image.jpg",
68
68
transformation : [{
69
- "HEIGHT " : "300",
70
- "WIDTH " : "400"
69
+ "height " : "300",
70
+ "width " : "400"
71
71
}]
72
72
});
73
73
```
@@ -98,10 +98,10 @@ var imageURL = imagekit.url({
98
98
path : "/default-image.jpg",
99
99
urlEndpoint : "https://ik.imagekit.io/your_imagekit_id/endpoint/",
100
100
transformation : [{
101
- "HEIGHT " : "300",
102
- "WIDTH " : "400"
101
+ "height " : "300",
102
+ "width " : "400"
103
103
}, {
104
- "ROTATION " : 90
104
+ "rotation " : 90
105
105
}],
106
106
transformationPosition : "query"
107
107
});
@@ -118,10 +118,10 @@ There are some transforms like [Sharpening](https://docs.imagekit.io/imagekit-do
118
118
var imageURL = imagekit.url({
119
119
src : "https://ik.imagekit.io/your_imagekit_id/endpoint/default-image.jpg",
120
120
transformation : [{
121
- "FORMAT " : "jpg",
122
- "PROGRESSIVE " : "true",
123
- "EFFECT_SHARPEN " : "-",
124
- "EFFECT_CONTRAST " : "1"
121
+ "format " : "jpg",
122
+ "progressive " : "true",
123
+ "effectSharpen " : "-",
124
+ "effectContrast " : "1"
125
125
}]
126
126
});
127
127
```
@@ -136,48 +136,48 @@ The complete list of transformations supported and their usage in ImageKit can b
136
136
137
137
| Supported Transformation Name | Translates to parameter |
138
138
| -------------------------------| -------------------------|
139
- | HEIGHT | h |
140
- | WIDTH | w |
141
- | ASPECT_RATIO | ar |
142
- | QUALITY | q |
143
- | CROP | c |
144
- | CROP_MODE | cm |
145
- | X | x |
146
- | Y | y |
147
- | FOCUS | fo |
148
- | FORMAT | f |
149
- | RADIUS | r |
150
- | BACKGROUND | bg |
151
- | BORDER | bo |
152
- | ROTATION | rt |
153
- | BLUR | bl |
154
- | NAMED | n |
155
- | OVERLAY_IMAGE | oi |
156
- | OVERLAY_X | ox |
157
- | OVERLAY_Y | oy |
158
- | OVERLAY_FOCUS | ofo |
159
- | OVERLAY_HEIGHT | oh |
160
- | OVERLAY_WIDTH | ow |
161
- | OVERLAY_TEXT | ot |
162
- | OVERLAY_TEXT_FONT_SIZE | ots |
163
- | OVERLAY_TEXT_FONT_FAMILY | otf |
164
- | OVERLAY_TEXT_COLOR | otc |
165
- | OVERLAY_ALPHA | oa |
166
- | OVERLAY_TEXT_TYPOGRAPHY | ott |
167
- | OVERLAY_BACKGROUND | obg |
168
- | OVERLAY_IMAGE_TRIM | oit |
169
- | PROGRESSIVE | pr |
170
- | LOSSLESS | lo |
171
- | TRIM | t |
172
- | METADATA | md |
173
- | COLOR_PROFILE | cp |
174
- | DEFAULT_IMAGE | di |
175
- | DPR | dpr |
176
- | EFFECT_SHARPEN | e-sharpen |
177
- | EFFECT_USM | e-usm |
178
- | EFFECT_CONTRAST | e-contrast |
179
- | EFFECT_GRAY | e-grayscale |
180
- | ORIGINAL | orig |
139
+ | height | h |
140
+ | width | w |
141
+ | aspectRatio | ar |
142
+ | quality | q |
143
+ | crop | c |
144
+ | cropMode | cm |
145
+ | x | x |
146
+ | y | y |
147
+ | focus | fo |
148
+ | format | f |
149
+ | radius | r |
150
+ | background | bg |
151
+ | border | bo |
152
+ | rotation | rt |
153
+ | blur | bl |
154
+ | named | n |
155
+ | overlayImage | oi |
156
+ | overlayX | ox |
157
+ | overlayY | oy |
158
+ | overlayFocus | ofo |
159
+ | overlayHeight | oh |
160
+ | overlayWidth | ow |
161
+ | overlayText | ot |
162
+ | overlayTextFontSize | ots |
163
+ | overlayTextFontFamily | otf |
164
+ | overlayTextColor | otc |
165
+ | overlayAlpha | oa |
166
+ | overlayTextTypography | ott |
167
+ | overlayBackground | obg |
168
+ | overlayImageTrim | oit |
169
+ | progressive | pr |
170
+ | lossless | lo |
171
+ | trim | t |
172
+ | metadata | md |
173
+ | colorProfile | cp |
174
+ | defaultImage | di |
175
+ | dpr | dpr |
176
+ | effectSharpen | e-sharpen |
177
+ | effectUSM | e-usm |
178
+ | effectContrast | e-contrast |
179
+ | effectGray | e-grayscale |
180
+ | original | orig |
181
181
182
182
183
183
### File Upload
@@ -218,7 +218,10 @@ Sample usage
218
218
console.log(arguments);
219
219
console.log(imagekit.url({
220
220
src: result.url,
221
- transformation : [{ HEIGHT: 300, WIDTH: 400}]
221
+ transformation : [{
222
+ height: 300,
223
+ width: 400
224
+ }]
222
225
}));
223
226
});
224
227
}
0 commit comments