Skip to content

Commit 478cc1c

Browse files
committed
docs: update preinstall
1 parent 8778846 commit 478cc1c

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

extensions/image-processing-api/PREINSTALL.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,23 @@ const operations = [
2222
const params = `?operations=${encodeURIComponent(JSON.stringify(operations))}`;
2323
```
2424

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+
2542
View the [official documentation](https://extensions.invertase.dev/image-processing-api) for full usage examples.
2643

2744
#### Additional setup

extensions/image-processing-api/extension.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: image-processing-api
2-
version: 0.0.2
2+
version: 0.1.0
33
specVersion: v1beta
44

55
displayName: Image Processing API

0 commit comments

Comments
 (0)