@@ -6,7 +6,11 @@ ImageKit is a complete image optimization and transformation solution that comes
66
77## Installation
88
9- ` npm install imagekit `
9+ Use the following command to download this module. Use the optional ` --save ` parameter if you wish to save the dependency in your ` package.json ` file.
10+
11+ ```
12+ npm install imagekit
13+ ```
1014
1115## Initialization
1216
@@ -34,8 +38,8 @@ var imageURL = imagekit.url({
3438 path : "/default-image.jpg",
3539 urlEndpoint : "https://ik.imagekit.io/your_imagekit_id/endpoint/",
3640 transformation : [{
37- "HEIGHT " : "300",
38- "WIDTH " : "400"
41+ "height " : "300",
42+ "width " : "400"
3943 }]
4044});
4145```
@@ -55,8 +59,8 @@ This method allows you to add transformation parameters to an existing, complete
5559var imageURL = imagekit.url({
5660 src : "https://ik.imagekit.io/your_imagekit_id/endpoint/default-image.jpg",
5761 transformation : [{
58- "HEIGHT " : "300",
59- "WIDTH " : "400"
62+ "height " : "300",
63+ "width " : "400"
6064 }]
6165});
6266```
@@ -89,10 +93,10 @@ var imageURL = imagekit.url({
8993 path : "/default-image.jpg",
9094 urlEndpoint : "https://ik.imagekit.io/your_imagekit_id/endpoint/",
9195 transformation : [{
92- "HEIGHT " : "300",
93- "WIDTH " : "400"
96+ "height " : "300",
97+ "width " : "400"
9498 }, {
95- "ROTATION " : 90
99+ "rotation " : 90
96100 }],
97101 transformationPosition : "query"
98102});
@@ -109,10 +113,10 @@ There are some transforms like [Sharpening](https://docs.imagekit.io/imagekit-do
109113var imageURL = imagekit.url({
110114 src : "https://ik.imagekit.io/your_imagekit_id/endpoint/default-image.jpg",
111115 transformation : [{
112- "FORMAT " : "jpg",
113- "PROGRESSIVE " : "true",
114- "EFFECT_SHARPEN " : "-",
115- "EFFECT_CONTRAST " : "1"
116+ "format " : "jpg",
117+ "progressive " : "true",
118+ "effectSharpen " : "-",
119+ "effectContrast " : "1"
116120 }]
117121});
118122```
@@ -129,8 +133,8 @@ var imageURL = imagekit.url({
129133 "v" : "123"
130134 },
131135 transformation : [{
132- "HEIGHT " : "300",
133- "WIDTH " : "400"
136+ "height " : "300",
137+ "width " : "400"
134138 }],
135139 signed : true,
136140 expireSeconds : 300
@@ -146,48 +150,48 @@ The complete list of transformations supported and their usage in ImageKit can b
146150
147151| Supported Transformation Name | Translates to parameter |
148152| -------------------------------| -------------------------|
149- | HEIGHT | h |
150- | WIDTH | w |
151- | ASPECT_RATIO | ar |
152- | QUALITY | q |
153- | CROP | c |
154- | CROP_MODE | cm |
155- | X | x |
156- | Y | y |
157- | FOCUS | fo |
158- | FORMAT | f |
159- | RADIUS | r |
160- | BACKGROUND | bg |
161- | BORDER | bo |
162- | ROTATION | rt |
163- | BLUR | bl |
164- | NAMED | n |
165- | OVERLAY_IMAGE | oi |
166- | OVERLAY_X | ox |
167- | OVERLAY_Y | oy |
168- | OVERLAY_FOCUS | ofo |
169- | OVERLAY_HEIGHT | oh |
170- | OVERLAY_WIDTH | ow |
171- | OVERLAY_TEXT | ot |
172- | OVERLAY_TEXT_FONT_SIZE | ots |
173- | OVERLAY_TEXT_FONT_FAMILY | otf |
174- | OVERLAY_TEXT_COLOR | otc |
175- | OVERLAY_ALPHA | oa |
176- | OVERLAY_TEXT_TYPOGRAPHY | ott |
177- | OVERLAY_BACKGROUND | obg |
178- | OVERLAY_IMAGE_TRIM | oit |
179- | PROGRESSIVE | pr |
180- | LOSSLESS | lo |
181- | TRIM | t |
182- | METADATA | md |
183- | COLOR_PROFILE | cp |
184- | DEFAULT_IMAGE | di |
185- | DPR | dpr |
186- | EFFECT_SHARPEN | e-sharpen |
187- | EFFECT_USM | e-usm |
188- | EFFECT_CONTRAST | e-contrast |
189- | EFFECT_GRAY | e-grayscale |
190- | ORIGINAL | orig |
153+ | height | h |
154+ | width | w |
155+ | aspectRatio | ar |
156+ | quality | q |
157+ | crop | c |
158+ | cropMode | cm |
159+ | x | x |
160+ | y | y |
161+ | focus | fo |
162+ | format | f |
163+ | radius | r |
164+ | background | bg |
165+ | border | bo |
166+ | rotation | rt |
167+ | blur | bl |
168+ | named | n |
169+ | overlayImage | oi |
170+ | overlayX | ox |
171+ | overlayY | oy |
172+ | overlayFocus | ofo |
173+ | overlayHeight | oh |
174+ | overlayWidth | ow |
175+ | overlayText | ot |
176+ | overlayTextFontSize | ots |
177+ | overlayTextFontFamily | otf |
178+ | overlayTextColor | otc |
179+ | overlayAlpha | oa |
180+ | overlayTextTypography | ott |
181+ | overlayBackground | obg |
182+ | overlayImageTrim | oit |
183+ | progressive | pr |
184+ | lossless | lo |
185+ | trim | t |
186+ | metadata | md |
187+ | colorProfile | cp |
188+ | defaultImage | di |
189+ | dpr | dpr |
190+ | effectSharpen | e-sharpen |
191+ | effectUSM | e-usm |
192+ | effectContrast | e-contrast |
193+ | effectGray | e-grayscale |
194+ | original | orig |
191195
192196
193197
0 commit comments