|
1 | 1 | /** |
2 | | - * @link https://docs.imagekit.io/features/image-transformations |
| 2 | + * @link https://imagekit.io/docs/transformations |
3 | 3 | */ |
4 | 4 | const supportedTransforms: { [key: string]: string } = { |
5 | | - /** |
6 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#width-w |
7 | | - */ |
8 | | - width: "w", |
9 | | - |
10 | | - /** |
11 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#height-h |
12 | | - */ |
13 | | - height: "h", |
14 | | - |
15 | | - /** |
16 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#aspect-ratio-ar |
17 | | - */ |
18 | 5 | aspectRatio: "ar", |
19 | | - |
20 | | - /** |
21 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#quality-q |
22 | | - */ |
23 | | - quality: "q", |
24 | | - |
25 | | - /** |
26 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#crop-crop-modes-and-focus |
27 | | - */ |
| 6 | + background: "bg", |
| 7 | + border: "b", |
28 | 8 | crop: "c", |
29 | | - |
30 | | - /** |
31 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#crop-crop-modes-and-focus |
32 | | - */ |
33 | 9 | cropMode: "cm", |
34 | | - |
35 | | - /** |
36 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#focus-fo |
37 | | - */ |
| 10 | + DPR: "dpr", |
38 | 11 | focus: "fo", |
39 | | - |
40 | | - /** |
41 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#examples-focus-using-cropped-image-coordinates |
42 | | - */ |
| 12 | + quality: "q", |
43 | 13 | x: "x", |
44 | | - |
45 | | - /** |
46 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#examples-focus-using-cropped-image-coordinates |
47 | | - */ |
| 14 | + xCenter: "xc", |
48 | 15 | y: "y", |
49 | | - |
50 | | - /** |
51 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#format-f |
52 | | - */ |
| 16 | + yCenter: "yc", |
| 17 | + height: "h", |
| 18 | + width: "w", |
53 | 19 | format: "f", |
54 | | - |
55 | | - /** |
56 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#radius-r |
57 | | - */ |
| 20 | + videoCodec: "vc", |
| 21 | + audioCodec: "ac", |
58 | 22 | radius: "r", |
59 | | - |
60 | | - /** |
61 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#background-color-bg |
62 | | - */ |
63 | | - background: "bg", |
64 | | - |
65 | | - /** |
66 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#border-b |
67 | | - */ |
68 | | - border: "b", |
69 | | - |
70 | | - /** |
71 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#rotate-rt |
72 | | - */ |
73 | 23 | rotation: "rt", |
74 | | - |
75 | | - /** |
76 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#rotate-rt |
77 | | - */ |
78 | 24 | rotate: "rt", |
79 | | - |
80 | | - /** |
81 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#blur-bl |
82 | | - */ |
83 | 25 | blur: "bl", |
84 | | - |
85 | | - /** |
86 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#named-transformation-n |
87 | | - */ |
88 | 26 | named: "n", |
89 | | - |
90 | | - /** |
91 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#progressive-image-pr |
92 | | - */ |
93 | | - progressive: "pr", |
94 | | - |
95 | | - /** |
96 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#lossless-webp-and-png-lo |
97 | | - */ |
98 | | - lossless: "lo", |
99 | | - |
100 | | - /** |
101 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#trim-edges-t |
102 | | - */ |
103 | | - trim: "t", |
104 | | - |
105 | | - /** |
106 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#image-metadata-md |
107 | | - */ |
108 | | - metadata: "md", |
109 | | - |
110 | | - /** |
111 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#color-profile-cp |
112 | | - */ |
113 | | - colorProfile: "cp", |
114 | | - |
115 | | - /** |
116 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#default-image-di |
117 | | - */ |
118 | 27 | defaultImage: "di", |
119 | | - |
120 | | - /** |
121 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#dpr-dpr |
122 | | - */ |
123 | | - dpr: "dpr", |
124 | | - |
125 | | - /** |
126 | | - * @link https://docs.imagekit.io/features/image-transformations/image-enhancement-and-color-manipulation#sharpen-e-sharpen |
127 | | - */ |
128 | | - effectSharpen: "e-sharpen", |
129 | | - |
130 | | - /** |
131 | | - * @link https://docs.imagekit.io/features/image-transformations/image-enhancement-and-color-manipulation#unsharp-mask-e-usm |
132 | | - */ |
133 | | - effectUSM: "e-usm", |
134 | | - |
135 | | - /** |
136 | | - * @link https://docs.imagekit.io/features/image-transformations/image-enhancement-and-color-manipulation#contrast-stretch-e-contrast |
137 | | - */ |
138 | | - effectContrast: "e-contrast", |
139 | | - |
140 | | - /** |
141 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#grayscale-e-grayscale |
142 | | - */ |
143 | | - effectGray: "e-grayscale", |
144 | | - |
145 | | - /** |
146 | | - * @link https://docs.imagekit.io/features/image-transformations/resize-crop-and-other-transformations#original-image-orig |
147 | | - */ |
| 28 | + flip: "fl", |
148 | 29 | original: "orig", |
149 | | - |
150 | | - /** |
151 | | - * @link https://docs.imagekit.io/features/image-transformations/image-enhancement-and-color-manipulation#shadow-e-shadow |
152 | | - */ |
| 30 | + startOffset: "so", |
| 31 | + endOffset: "eo", |
| 32 | + duration: "du", |
| 33 | + streamingResolutions: "sr", |
| 34 | + eGrayscale: "e-grayscale", |
| 35 | + eRemoveDotBg: "e-removedotbg", |
| 36 | + eUpscale: "e-upscale", |
| 37 | + eRetouch: "e-retouch", |
| 38 | + eGenvar: "e-genvar", |
| 39 | + eDropshadow: "e-dropshadow", |
| 40 | + eChangeBg: "e-changebg", |
| 41 | + eBgRemove: "e-bgremove", |
| 42 | + eContrast: "e-contrast", |
| 43 | + eShadow: "e-shadow", |
| 44 | + eSharpen: "e-sharpen", |
| 45 | + eUSM: "e-usm", |
| 46 | + eGradient: "e-gradient", |
| 47 | + effectContrast: "e-contrast", |
153 | 48 | effectShadow: "e-shadow", |
154 | | - |
155 | | - /** |
156 | | - * @link https://docs.imagekit.io/features/image-transformations/image-enhancement-and-color-manipulation#gradient-e-gradient |
157 | | - */ |
| 49 | + effectSharpen: "e-sharpen", |
| 50 | + effectUSM: "e-usm", |
158 | 51 | effectGradient: "e-gradient", |
159 | | - |
160 | | - /** |
161 | | - * @link https://docs.imagekit.io/features/image-transformations/conditional-transformations |
162 | | - */ |
163 | | - raw: "raw", |
| 52 | + effectGray: "e-grayscale", |
| 53 | + progressive: "pr", |
| 54 | + lossless: "lo", |
| 55 | + colorProfile: "cp", |
| 56 | + metadata: "md", |
| 57 | + opacity: "o", |
| 58 | + trim: "t", |
| 59 | + zoom: "z", |
| 60 | + page: "pg", |
| 61 | + raw: "raw", |
164 | 62 | } |
165 | 63 |
|
166 | 64 |
|
|
0 commit comments