File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
extensions/image-processing-api Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,23 @@ const operations = [
22
22
const params = ` ?operations=${ encodeURIComponent (JSON .stringify (operations))} ` ;
23
23
```
24
24
25
+ The extension also comes with a JavaScript utility library for simplifying the creation of operations:
26
+
27
+ ``` ts
28
+ import { builder } from ' @invertase/image-processing-api' ;
29
+
30
+ const output = builder ()
31
+ .input ({
32
+ url: ' https://example.com/image.jpg' ,
33
+ })
34
+ .grayscale ()
35
+ .output ({
36
+ format: ' webp' ,
37
+ });
38
+
39
+ const params = ` ?operations=${output .toEncodedJSONString ()} ` ;
40
+ ```
41
+
25
42
View the [ official documentation] ( https://extensions.invertase.dev/image-processing-api ) for full usage examples.
26
43
27
44
#### Additional setup
Original file line number Diff line number Diff line change 1
1
name : image-processing-api
2
- version : 0.0.2
2
+ version : 0.1.0
3
3
specVersion : v1beta
4
4
5
5
displayName : Image Processing API
You can’t perform that action at this time.
0 commit comments