@mts-pjsc/image-optimize 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,12 +17,20 @@ Features:
|
|
|
17
17
|
### Before use
|
|
18
18
|
[The optimization microservice](https://github.com/MobileTeleSystems/image-optimize) must be deployed on the server along the path `/optimizer`. React component will use it.
|
|
19
19
|
|
|
20
|
+
### Instalation
|
|
21
|
+
Run script:
|
|
22
|
+
```
|
|
23
|
+
npm i @mts-pjsc/image-optimize
|
|
24
|
+
```
|
|
25
|
+
|
|
20
26
|
### Using
|
|
21
27
|
|
|
22
28
|
Just replace the \<img\> element with the Image component from the package. The component is fully compatible with the \<img\> element. Next, the component will do all the magic on its own.
|
|
23
29
|
|
|
24
30
|
Sample:
|
|
25
31
|
```typescript
|
|
32
|
+
import {Image} from "@mts-pjsc/image-optimize";
|
|
33
|
+
|
|
26
34
|
<Image
|
|
27
35
|
alt="Sample of work Image Optimizer"
|
|
28
36
|
src="/static/landing/images-getmeback/phone-fon.png"
|