Skip to content

Commit fe98cde

Browse files
committed
added changes to README
1 parent 0bc358c commit fe98cde

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ const url = generateImageUrl(
4040
},
4141
salt: "520f986b998545b4785e0defbc4f3c1203f22de2374a3d53cb7a7fe9fea309c5",
4242
key: "943b421c9eb07c830af81030552c86009268de4e532ba2ee2eab8247c6da0881",
43-
encryptKey:
44-
"52dd01d54fcbd79ff247fcff1d2f200ce6b95546f960b084faa1d269fb95d600",
4543
);
4644
```
4745

@@ -55,15 +53,16 @@ It takes the following arguments:
5553
- `baseUrl` (`string`) - (required) the base URL of your imgproxy instance
5654
- `url` (`Object | string`) - (required) a string with url value or an object that contains the value and resultType properties. You can specify only url if you agree with default `url.resultType` = "base64" or you have to specify `url.value` and `url.resultType`.
5755
- `value` (`string`) - (required) the plain text URL of the image.
58-
- `resultType` (`"base64" | "encrypted" | "plain"`) - (optional) the type of the URL. Deafult value is `"base64"`.
56+
- `resultType` (`"base64" | "encrypted" | "plain"`) - (optional) the final type of URL you will receive . Deafult value is `"base64"`.
5957
Can be one of the following:
6058
- `"base64"` - a base64 encoded URL. Default value.
6159
- `"encrypted"` - (**PRO feature**) an AES-CBC encrypted URL.
6260
- `"plain"` - a plain text URL. We strongly recommend using `base64` or `encrypted` type.
6361
- `options` (`Object | undefined`) - (optional) an object that contains the resizing options. You can see all options in [imgproxy docs](https://docs.imgproxy.net/generating_the_url?id=processing-options) or in [Options types in imgproxy-js-core library](https://github.com/imgproxy/imgproxy-js-core/blob/main/src/types/index.ts).
6462
- `salt` (`string | undefined`) - (optional) the salt used to encode the URL. It must be a hex-encoded 16-byte string. This option overrides IMGPROXY_SALT environment variable from process.env for this call.
6563
- `key` (`string | undefined`) - (optional) the key used to encode the URL. It must be a hex-encoded 16-byte string. This option overrides IMGPROXY_KEY environment variable from process.env for this call.
66-
- `encryptKey` (`string | undefined`) - (optional, **PRO feature**) the key used to encrypt the URL. The key should be either 16, 24, or 32 bytes long for AES-128-CBC, AES-192-CBC, or AES-256-CBC, respectively. This option overrides IMGPROXY_SOURCE_URL_ENCRYPTION_KEY environment variable from process.env for this call. Actual only for plain url type.
64+
- `encryptKey` (`string | undefined`) - (optional, **PRO feature**) the key used to encrypt the URL. The key should be either 16, 24, or 32 bytes long for AES-128-CBC, AES-192-CBC, or AES-256-CBC, respectively. This option overrides IMGPROXY_SOURCE_URL_ENCRYPTION_KEY environment variable from process.env for this call.
65+
- `encryptIV` (`string | undefined`) - (optional, **PRO feature**) the IV used to encrypt the URL. The IV should be 16 bytes long. If not specified, the IV will be generated randomly. But we strongly recommend to specify it.
6766

6867
### generateImageInfoUrl
6968

@@ -73,12 +72,13 @@ It takes the following arguments:
7372
- `baseUrl` (`string`) - (required) the base URL of your imgproxy instance
7473
- `url` (`Object | string`) - (required) a string with url value or an object that contains the value and resultType properties. You can specify only url if you agree with default `url.resultType` = "base64" or you will have to specify `url.value` and `url.resultType`.
7574
- `value` (`string`) - (required) the plain text URL of the image.
76-
- `resultType` (`"base64" | "encrypted" | "plain"`) - (optional) the type of the URL. Deafult value is `"base64"`.
75+
- `resultType` (`"base64" | "encrypted" | "plain"`) - (optional) the final type of URL you will receive. Deafult value is `"base64"`.
7776
Can be one of the following:
7877
- `"base64"` - a base64 encoded URL. Default value.
7978
- `"encrypted"` - (**PRO feature**) an AES-CBC encrypted URL.
8079
- `"plain"` - a plain text URL. We strongly recommend using `base64` or `encrypted` type.
8180
- `options` (`Object | undefined`) - (optional) an object that contains the resizing options. You can see all options in [imgproxy docs](https://docs.imgproxy.net/getting_the_image_info?id=info-options) or in [OptionsImageInfo types in imgproxy-js-core library](https://github.com/imgproxy/imgproxy-js-core/blob/main/src/types/index.ts).
8281
- `salt` (`string | undefined`) - (optional) the salt used to encode the URL. It must be a hex-encoded 16-byte string. This option overrides IMGPROXY_SALT from process.env for one request.
8382
- `key` (`string | undefined`) - (optional) the key used to encode the URL. It must be a hex-encoded 16-byte string. This option overrides IMGPROXY_KEY from process.env for one request.
84-
- `encryptKey` (`string | undefined`) - (optional, **PRO feature**) the key used to encrypt the URL. The key should be either 16, 24, or 32 bytes long for AES-128-CBC, AES-192-CBC, or AES-256-CBC, respectively. This option overrides IMGPROXY_SOURCE_URL_ENCRYPTION_KEY from process.env for one request. Actual only for plain url type.
83+
- `encryptKey` (`string | undefined`) - (optional, **PRO feature**) the key used to encrypt the URL. The key should be either 16, 24, or 32 bytes long for AES-128-CBC, AES-192-CBC, or AES-256-CBC, respectively. This option overrides IMGPROXY_SOURCE_URL_ENCRYPTION_KEY from process.env for one request.
84+
- `encryptIV` (`string | undefined`) - (optional, **PRO feature**) the IV used to encrypt the URL. The IV should be 16 bytes long. If not specified, the IV will be generated randomly. But we strongly recommend to specify it.

0 commit comments

Comments
 (0)