You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`baseUrl` (`string`) - (required) the base URL of your imgproxy instance
54
-
-`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`.
53
+
-`endpoint` (`string`) - (required) the base URL of your imgproxy instance
54
+
-`url` (`Object | string`) - (required) a string with url value or an object that contains the value and displayAs properties. You can specify only url if you agree with default `url.displayAs` = "base64" or you have to specify `url.value` and `url.displayAs`.
55
55
-`value` (`string`) - (required) the plain text URL of the image.
56
-
-`resultType` (`"base64" | "encrypted" | "plain"`) - (optional) the final type of URL you will receive . Deafult value is `"base64"`.
56
+
-`displayAs` (`"base64" | "encrypted" | "plain"`) - (optional) how the image URL should be presented in the resulting imgproxy request URL. Deafult value is `"base64"`.
57
57
Can be one of the following:
58
58
-`"base64"` - a base64 encoded URL. Default value.
59
59
-`"encrypted"` - (**PRO feature**) an AES-CBC encrypted URL.
60
60
-`"plain"` - a plain text URL. We strongly recommend using `base64` or `encrypted` type.
61
61
-`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).
62
-
-`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.
63
-
-`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.
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.
62
+
-`salt` (`string | undefined`) - (optional) hex-encoded 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.
63
+
-`key` (`string | undefined`) - (optional) hex-encoded 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.
64
+
-`encryptKey` (`string | undefined`) - (optional, **PRO feature**) hex-encoded 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**) hex-encoded 16-bytes length IV for encrypting url. If not specified, the IV will be generated randomly. But it's better if you specify it yourself. Read more in [imgproxy docs iv-generation](https://docs.imgproxy.net/usage/encrypting_source_url#iv-generation).
66
66
67
67
### generateImageInfoUrl
68
68
69
69
This method generates an imgproxy URL to get a source image info.
70
70
It takes the following arguments:
71
71
72
-
-`baseUrl` (`string`) - (required) the base URL of your imgproxy instance
73
-
-`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`.
72
+
-`endpoint` (`string`) - (required) the base URL of your imgproxy instance
73
+
-`url` (`Object | string`) - (required) a string with url value or an object that contains the value and displayAs properties. You can specify only url if you agree with default `url.displayAs` = "base64" or you will have to specify `url.value` and `url.displayAs`.
74
74
-`value` (`string`) - (required) the plain text URL of the image.
75
-
-`resultType` (`"base64" | "encrypted" | "plain"`) - (optional) the final type of URL you will receive. Deafult value is `"base64"`.
75
+
-`displayAs` (`"base64" | "encrypted" | "plain"`) - (optional) how the image URL should be presented in the resulting imgproxy request URL. Deafult value is `"base64"`.
76
76
Can be one of the following:
77
77
-`"base64"` - a base64 encoded URL. Default value.
78
78
-`"encrypted"` - (**PRO feature**) an AES-CBC encrypted URL.
79
79
-`"plain"` - a plain text URL. We strongly recommend using `base64` or `encrypted` type.
80
80
-`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).
81
-
-`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.
82
-
-`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.
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.
81
+
-`salt` (`string | undefined`) - (optional) hex-encoded 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.
82
+
-`key` (`string | undefined`) - (optional) hex-encoded 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.
83
+
-`encryptKey` (`string | undefined`) - (optional, **PRO feature**) hex-encoded 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**) hex-encoded 16-bytes length IV for encrypting url. If not specified, the IV will be generated randomly. But it's better if you specify it yourself. Read more in [imgproxy docs iv-generation](https://docs.imgproxy.net/usage/encrypting_source_url#iv-generation).
Copy file name to clipboardExpand all lines: src/methods/generateImageInfoUrl.ts
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,10 @@ import type { IGenerateImageInfoUrl } from "../types";
8
8
9
9
/**
10
10
* Generate image info url. **PRO feature**
11
-
* @param {string} baseUrl - Base url
12
-
* @param {Object | string} url - you can specify only url if you agree with default url.resultType = "base64" or you have to specify url.value and url.resultType
11
+
* @param {string} endpoint - Base url
12
+
* @param {Object | string} url - you can specify only url if you agree with default url.displayAs = "base64" or you have to specify url.value and url.displayAs
13
13
* @param {string} url.value - url value
14
-
* @param {string} url.resultType - (optional) here you specify in what type of image URL is required in the generated.
14
+
* @param {string} url.displayAs - (optional) here you specify in what type of image URL is required in the generated.
15
15
* Imgproxy request URL: "plain", "base64" or "encrypted" (encrypted is PRO feature). We strongly recommend to use "base64" or "encrypted" kind of url. default: `"base64"`.
16
16
* @param {Object} [options] - (optional) options. You can see all options in [imgproxy docs](https://docs.imgproxy.net/getting_the_image_info?id=info-options)
17
17
* or in OptionsImageInfo types in imgproxy-js-core.d.ts
@@ -26,7 +26,7 @@ import type { IGenerateImageInfoUrl } from "../types";
Copy file name to clipboardExpand all lines: src/methods/generateImageUrl.ts
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,10 @@ import type { IGenerateImageUrl } from "../types";
5
5
6
6
/**
7
7
* Generate image url
8
-
* @param {string} baseUrl - Base url
9
-
* @param {Object | string} url - you can specify only url if you agree with default url.resultType = "base64" or you have to specify url.value and url.resultType
8
+
* @param {string} endpoint - Base url
9
+
* @param {Object | string} url - you can specify only url if you agree with default url.displayAs = "base64" or you have to specify url.value and url.displayAs
10
10
* @param {string} url.value - url value
11
-
* @param {string} url.resultType - (optional) here you specify in what type of image URL is required in the generated.
11
+
* @param {string} url.displayAs - (optional) how the image URL should be presented in the resulting imgproxy request URL.
12
12
* Imgproxy request URL: "plain", "base64" or "encrypted" (encrypted is PRO feature). We strongly recommend to use "base64" or "encrypted" kind of url. default: `"base64"`
13
13
* @param {Object} [options] - (optional) options. You can see all options in [imgproxy docs](https://docs.imgproxy.net/generating_the_url?id=processing-options)
14
14
* or in Options types in imgproxy-js-core.d.ts
@@ -23,7 +23,7 @@ import type { IGenerateImageUrl } from "../types";
0 commit comments