@mts-pjsc/image-optimize 1.3.5 → 1.3.7
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 +6 -3
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Features:
|
|
|
8
8
|
- Resize images for the user's screen size,
|
|
9
9
|
- Image compressions to reduce traffic,
|
|
10
10
|
- Converting images to modern formats such as webp and avif,
|
|
11
|
-
- Works with
|
|
11
|
+
- Works with dynamic content, compression occurs on the fly,
|
|
12
12
|
- High compression speed, an average picture is processed in just 200 ms,
|
|
13
13
|
- Includes exporter of metrics for Prometheus,
|
|
14
14
|
- Supports basic authorization for multiple domains and endpoints,
|
|
@@ -17,9 +17,11 @@ 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
|
-
###
|
|
20
|
+
### Installation
|
|
21
|
+
|
|
21
22
|
Run script:
|
|
22
|
-
|
|
23
|
+
|
|
24
|
+
```bash
|
|
23
25
|
npm i @mts-pjsc/image-optimize
|
|
24
26
|
```
|
|
25
27
|
|
|
@@ -28,6 +30,7 @@ npm i @mts-pjsc/image-optimize
|
|
|
28
30
|
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.
|
|
29
31
|
|
|
30
32
|
Sample:
|
|
33
|
+
|
|
31
34
|
```typescript
|
|
32
35
|
import {Image} from "@mts-pjsc/image-optimize";
|
|
33
36
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mts-pjsc/image-optimize",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"description": "React component for image optimizer",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"react": ">=16.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
+
"@commitlint/cli": "^17.3.0",
|
|
41
|
+
"@commitlint/config-conventional": "^17.3.0",
|
|
40
42
|
"@labeg/code-style": "^6.5.0",
|
|
41
43
|
"@types/node": "^24.0.15",
|
|
42
44
|
"@types/react": "^19.1.8",
|