This repository was archived by the owner on Mar 6, 2025. It is now read-only.
Commit ed69719
committed
Improvement(ImageCropper): scale image down
After cropping, the avatar editor would upload the full-size image even
though these images are used at much smaller dimensions.
This change uses a version of the image scaled down to the size of the
canvas which results in considerable file size reduction for large images.1 parent 204d0cd commit ed69719
File tree
4 files changed
+18
-25
lines changed- src/components
- __tests__
4 files changed
+18
-25
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 8 | | |
17 | 9 | | |
18 | 10 | | |
19 | 11 | | |
20 | | - | |
| 12 | + | |
21 | 13 | | |
22 | 14 | | |
23 | 15 | | |
| |||
31 | 23 | | |
32 | 24 | | |
33 | 25 | | |
34 | | - | |
| 26 | + | |
35 | 27 | | |
36 | 28 | | |
37 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 9 | | |
19 | 10 | | |
20 | 11 | | |
| |||
38 | 29 | | |
39 | 30 | | |
40 | 31 | | |
41 | | - | |
| 32 | + | |
42 | 33 | | |
43 | 34 | | |
44 | | - | |
| 35 | + | |
45 | 36 | | |
46 | 37 | | |
47 | 38 | | |
| |||
81 | 72 | | |
82 | 73 | | |
83 | 74 | | |
84 | | - | |
| 75 | + | |
85 | 76 | | |
86 | 77 | | |
87 | 78 | | |
| |||
0 commit comments