Skip to content

Commit 637adb8

Browse files
committed
readme fix
1 parent 6da76da commit 637adb8

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ ImageKit is complete media storage, optimization, and transformation solution th
1313

1414
## Installation
1515

16-
"`shell
16+
```shell
1717
npm install --save imagekitio-angular
1818
```
1919

2020
or
2121

22-
"`shell
22+
```shell
2323
yarn add imagekitio-angular
2424
```
2525

@@ -29,7 +29,7 @@ yarn add imagekitio-angular
2929

3030
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:
3131

32-
"`js
32+
```js
3333
@NgModule({
3434
declarations: [
3535
AppComponent
@@ -56,7 +56,7 @@ To use the SDK, you need to provide it with a few configuration parameters. The
5656
5757
### Quick examples
5858

59-
"`js
59+
```js
6060
// Render an image using a relative path - https://ik.imagekit.io/your_imagekit_id/default-image.jpg
6161
<ik-image path="/default-image.jpg"></ik-image>
6262

@@ -166,13 +166,13 @@ The `ik-image` component renders an `img` tag. It is used for rendering and mani
166166
| 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. |
167167
| 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. |
168168
| 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.|
170170

171171
### Basic resizing examples
172172

173173
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:
174174

175-
"`js
175+
```js
176176
// IThe following resizes the image to 300x300px
177177
flexibleTransformationOne: Array<Transformation> = [{
178178
height: "300",
@@ -181,7 +181,7 @@ flexibleTransformationOne: Array<Transformation> = [{
181181
```
182182
Sample usage of ik-image component:
183183

184-
"`js
184+
```js
185185
// Loading image with no transformation
186186
<ik-image
187187
path="/default-image.jpg"
@@ -270,7 +270,7 @@ See the complete list of transformations supported in ImageKit [here](https://do
270270
### Chained Transforms
271271
Chained transformations provide a simple way to control the sequence in which transformations are applied.
272272

273-
"`js
273+
```js
274274
// Using chained transformation. First, resize and then rotate the image to 90 degrees.
275275
<ik-image
276276
path="/default-image.jpg"
@@ -289,7 +289,7 @@ In the above case, the rotation will be performed first, and resizing according
289289

290290
### Lazy loading images
291291

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.
293293

294294
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.
295295

@@ -299,7 +299,7 @@ On fast connections (e.g 4G), the value of threshold is `1250px` and on slower c
299299
300300
Example usage:
301301

302-
"`js
302+
```js
303303
// Lazy loading images
304304
<ik-image
305305
path="/default-image.jpg"
@@ -348,7 +348,7 @@ You can also specify a `raw` transformation if you want more control over the UR
348348
### Combining lazy loading with low-quality placeholders
349349
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.
350350

351-
"`js
351+
```js
352352
// Loading a blurred low-quality image placeholder and lazy-loading original when the user scrolls near them
353353
<ik-image
354354
path="/default-image.jpg"
@@ -373,7 +373,7 @@ The `ik-video` component renders a `video` tag. It is used for rendering and man
373373

374374
### Basic video resizing examples
375375

376-
"`js
376+
```js
377377
// Video from related file path with no transformations - https://ik.imagekit.io/your_imagekit_id/sample-video.mp4
378378
<ik-video
379379
path="/sample-video.mp4"
@@ -437,7 +437,7 @@ Note: All three `urlEndpoint`, `publicKey` and `authenticationEndpoint` must be
437437

438438
Sample usage
439439

440-
"`js
440+
```js
441441
// Added to app.component.ts
442442
validateFileFunction(res: File) {
443443
console.log('validating')
@@ -481,7 +481,7 @@ validateFileFunction(res: File) {
481481

482482
Custom button example, using buttonRef
483483

484-
"`js
484+
```js
485485
// Set the [buttonRef] attribute
486486
<ik-upload
487487
fileName= "test.jpg"
@@ -504,7 +504,7 @@ Custom button example, using buttonRef
504504

505505
Sample usage
506506

507-
"`js
507+
```js
508508
import { ImagekitService } from 'imagekitio-angular';
509509
...
510510
// Initializing the service with configuration
@@ -530,7 +530,7 @@ You can use the `urlEndpoint` property in a component to change url for it.
530530

531531
Here is an example where the `ik-image` component's URL endpoint can be explicitly set:
532532

533-
"`js
533+
```js
534534
<ik-image
535535
path="/path-to-my-image"
536536
urlEndpoint="https://images.custom-domain.com"

0 commit comments

Comments
 (0)