@@ -72,13 +72,12 @@ app.prepare().then(() => {
7272After registering the endpoint you can use the ` <ProxyImage /> ` component as you would with the ` Image ` component from ` next/image ` , except that you need to provide a file (` <bucketname>/<filename> ` ) instead of ` src ` and optional proxy params for image transformations/optimizations.
7373
7474``` tsx
75- import ProxyImage , {
76- ImgProxyParamBuilder ,
77- } from ' @bitpatty/next-image-s3-imgproxy-loader' ;
75+ import ProxyImage from ' @bitpatty/next-image-s3-imgproxy-loader' ;
76+ import pb from ' @bitpatty/imgproxy-url-builder' ;
7877
7978<ProxyImage
8079 file = " mybucket/myfile.png"
81- proxyParams = { new ImgProxyParamBuilder ().rotate (180 ).blur (10 ).build ()}
80+ proxyParams = { pb ().rotate (180 ).blur (10 ).build ()}
8281/>;
8382```
8483
@@ -90,9 +89,10 @@ In case using the component is not an option, you can instead use the image path
9089
9190``` tsx
9291import { buildProxyImagePath } from ' @bitpatty/next-image-s3-imgproxy-loader' ;
92+ import pb from ' @bitpatty/imgproxy-url-builder' ;
9393
9494const imagePath = buildProxyImagePath (' test-bucket/test-image.png' , {
95- proxyParams: new ImgProxyParamBuilder ().blur (10 ).build (),
95+ proxyParams: pb ().blur (10 ).build (),
9696});
9797
9898<img src = { imagePath } />;
@@ -102,9 +102,10 @@ or as background image
102102
103103``` tsx
104104import { buildProxyImagePath } from ' @bitpatty/next-image-s3-imgproxy-loader' ;
105+ import pb from ' @bitpatty/imgproxy-url-builder' ;
105106
106107const imagePath = buildProxyImagePath (' test-bucket/test-image.png' , {
107- proxyParams: new ImgProxyParamBuilder ().blur (10 ).format (' jpg' ).build (),
108+ proxyParams: pb ().blur (10 ).format (' jpg' ).build (),
108109});
109110
110111<div
@@ -139,36 +140,3 @@ buildProxyImagePath('test-bucket/test-image.png', {
139140 endpoint: ' /my-endpoint' ,
140141});
141142` ` `
142-
143- ## Available Transformations
144-
145- The following transformations have been implemented (Note that it is not planned to implement PRO transformations).
146-
147- | Transformation | Supported |
148- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
149- | [` Signature` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#signature) | :white_check_mark: |
150- | [` Blur` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#blur) | :white_check_mark: |
151- | [` Resize` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#resize) | :white_check_mark: |
152- | [` Size` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#size) | :wavy_dash: (via Resize) |
153- | [` Width` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#width) | :wavy_dash: (via Resize) |
154- | [` Height` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#height) | :wavy_dash: (via Resize) |
155- | [` Dpr` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#dpr) | :white_check_mark: |
156- | [` Enlarge` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#enlarge) | :wavy_dash: (via Resize) |
157- | [` Extend` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#extend) | :wavy_dash: (via Resize) |
158- | [` Gravity` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#gravity) | :wavy_dash: (via Resize) |
159- | [` Crop` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#crop) | :white_check_mark: |
160- | [` Padding` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#padding) | :white_check_mark: |
161- | [` Trim` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#trim) | :white_check_mark: |
162- | [` Rotate` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#rotate) | :white_check_mark: |
163- | [` Quality` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#quality) | :white_check_mark: |
164- | [` Max Bytes` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#max-bytes) | :white_check_mark: |
165- | [` Background` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#background) | :white_check_mark: |
166- | [` Sharpen` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#sharpen) | :white_check_mark: |
167- | [` Watermark` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#watermark) | :white_check_mark: |
168- | [` Preset` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#preset) | :white_check_mark: |
169- | [` Cache Buster` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#cache-buster) | :white_check_mark: |
170- | [` Strip Metadata` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#strip-metadata) | :white_check_mark: |
171- | [` Strip Color Profile` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#strip-color-profile) | :white_check_mark: |
172- | [` Auto Rotate` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#auto-rotate) | :white_check_mark: |
173- | [` Filename` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#filename) | :white_check_mark: |
174- | [` Format` ](https://github.com/imgproxy/imgproxy/blob/master/docs/generating_the_url_advanced.md#format) | :white_check_mark: |
0 commit comments