Skip to content

Commit d3928d0

Browse files
authored
update readme
1 parent 74b2628 commit d3928d0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ pb().rotate(90).blur(10).build({
5555
path: 's3://mybucket/myimage.png',
5656
baseUrl: 'https://my-imgproxy-instance.example.com',
5757
});
58+
59+
// You can clone the current configuration for templating / reuse
60+
const template = pb().rotate(90);
61+
const copy = template.clone();
62+
63+
// To remove a modifier, use the `unset` function
64+
const t = pb().rotate(90).blur(10);
65+
t.unset('rotate');
66+
67+
// ... Or you can replace the previous setting by calling the
68+
// modifier again
69+
const t = pb().rotate(90).blur(10); // rotate: 90, blur: 10
70+
t.rotate(34); // rotate: 34, blur: 10
5871
```
5972

6073
## Supported Imgproxy Transformations

0 commit comments

Comments
 (0)