You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,13 +13,13 @@ ImageKit is complete media storage, optimization, and transformation solution th
13
13
14
14
## Installation
15
15
16
-
"`shell
16
+
```shell
17
17
npm install --save imagekitio-angular
18
18
```
19
19
20
20
or
21
21
22
-
"`shell
22
+
```shell
23
23
yarn add imagekitio-angular
24
24
```
25
25
@@ -29,7 +29,7 @@ yarn add imagekitio-angular
29
29
30
30
To use the SDK, you need to provide it with a few configuration parameters. The configuration parameters must be passed to the `ImagekitioAngularModule` module in your `app.module.ts` file. example:
31
31
32
-
"`js
32
+
```js
33
33
@NgModule({
34
34
declarations: [
35
35
AppComponent
@@ -56,7 +56,7 @@ To use the SDK, you need to provide it with a few configuration parameters. The
56
56
57
57
### Quick examples
58
58
59
-
"`js
59
+
```js
60
60
// Render an image using a relative path - https://ik.imagekit.io/your_imagekit_id/default-image.jpg
61
61
<ik-image path="/default-image.jpg"></ik-image>
62
62
@@ -166,13 +166,13 @@ The `ik-image` component renders an `img` tag. It is used for rendering and mani
166
166
| transformationPosition | String |Optional. The default value is `path`, which places the transformation string as a URL path parameter. It can also be specified as `query`, which adds the transformation string as the URL's query parameter i.e.`tr`. If you use the `src` parameter to create the URL, then the transformation string is always added as a query parameter. |
167
167
| queryParameters | Object |Optional. These are the other query parameters that you want to add to the final URL. These can be any query parameters and are not necessarily related to ImageKit. Especially useful if you want to add some versioning parameters to your URLs. |
168
168
| loading | String |Optional. Pass `lazy` to lazy load images. Note: The component does not accept change in this value after it has mounted. |
169
-
| lqip | Object |Optional. You can use this to show a low-quality blurred placeholder while the original image is being loaded e.g. `{active:true, quality: 20, blur: 6, raw: "n-lqip_named_transformation"`}. The default value of `quality` is `20`, and `blur` is `6`. If `raw` transformation is provided, SDK uses that and ignores the `quality` and `blur` parameters. <br /> Note: Component does not accept change in this value after it has mounted.|
169
+
| lqip | Object |Optional. You can use this to show a low-quality blurred placeholder while the original image is being loaded e.g. `{active:true, quality: 20, blur: 6, raw: "n-lqip_named_transformation```}. The default value of `quality` is `20`, and `blur` is `6`. If `raw` transformation is provided, SDK uses that and ignores the `quality` and `blur` parameters. <br /> Note: Component does not accept change in this value after it has mounted.|
170
170
171
171
### Basic resizing examples
172
172
173
173
The `transformation` prop is an array of objects. Each object can have the following properties. When you specify more than one object, each object is added as a chained transformation. For example:
@@ -270,7 +270,7 @@ See the complete list of transformations supported in ImageKit [here](https://do
270
270
### Chained Transforms
271
271
Chained transformations provide a simple way to control the sequence in which transformations are applied.
272
272
273
-
"`js
273
+
```js
274
274
// Using chained transformation. First, resize and then rotate the image to 90 degrees.
275
275
<ik-image
276
276
path="/default-image.jpg"
@@ -289,7 +289,7 @@ In the above case, the rotation will be performed first, and resizing according
289
289
290
290
### Lazy loading images
291
291
292
-
You can lazy load images using `loading= "lazy"`. When you use `loading= "lazy"`, all images that are immediately viewable without scrolling load normally. Those far below the device viewport are only fetched when the user scrolls near them.
292
+
You can lazy load images using `loading= "lazy```. When you use `loading= "lazy```, all images that are immediately viewable without scrolling load normally. Those far below the device viewport are only fetched when the user scrolls near them.
293
293
294
294
The SDK uses a fixed threshold based on the effective connection type to ensure that images are loaded early enough so that they have finished loading once the user scrolls near to them.
295
295
@@ -299,7 +299,7 @@ On fast connections (e.g 4G), the value of threshold is `1250px` and on slower c
299
299
300
300
Example usage:
301
301
302
-
"`js
302
+
```js
303
303
// Lazy loading images
304
304
<ik-image
305
305
path="/default-image.jpg"
@@ -348,7 +348,7 @@ You can also specify a `raw` transformation if you want more control over the UR
348
348
### Combining lazy loading with low-quality placeholders
349
349
You can lazy-load the original image only when the user scrolls near them. Until then, only a low-quality placeholder is loaded. This saves a lot of network bandwidth if the user never scrolls further down.
350
350
351
-
"`js
351
+
```js
352
352
// Loading a blurred low-quality image placeholder and lazy-loading original when the user scrolls near them
353
353
<ik-image
354
354
path="/default-image.jpg"
@@ -373,7 +373,7 @@ The `ik-video` component renders a `video` tag. It is used for rendering and man
373
373
374
374
### Basic video resizing examples
375
375
376
-
"`js
376
+
```js
377
377
// Video from related file path with no transformations - https://ik.imagekit.io/your_imagekit_id/sample-video.mp4
378
378
<ik-video
379
379
path="/sample-video.mp4"
@@ -437,7 +437,7 @@ Note: All three `urlEndpoint`, `publicKey` and `authenticationEndpoint` must be
0 commit comments