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
Copy file name to clipboardExpand all lines: components/cloudinary/actions/image-transformation/image-transformation.mjs
+42-8Lines changed: 42 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2,30 +2,64 @@ import cloudinary from "../../cloudinary.app.mjs";
2
2
3
3
exportdefault{
4
4
key: "cloudinary-image-transformation",
5
-
name: "Image Transformation",
6
-
description: "Transforms images on-the-fly. It modifies them to any required format, style and dimension, resize and crop the images, etc. [See the documentation](https://cloudinary.com/documentation/image_transformations)",
7
-
version: "0.1.2",
5
+
name: "Transform Image",
6
+
description: "Transform an image on-the-fly with several options. [See the documentation](https://cloudinary.com/documentation/image_transformations)",
7
+
version: "0.1.{{ts}}",
8
8
type: "action",
9
9
props: {
10
10
cloudinary,
11
11
imageSource: {
12
12
type: "string",
13
13
label: "Public ID",
14
-
description: "The [public ID](https://cloudinary.com/documentation/upload_images#public_id) that references a file you've previously uploaded to Cloudinary, e.g. `folder/filename`.",
14
+
description: "The [public ID](https://cloudinary.com/documentation/upload_images#public_id) of the asset , e.g. `folder/filename`.",
15
15
},
16
-
options: {
16
+
width: {
17
+
type: "integer",
18
+
label: "Width",
19
+
description: "The new width of the image, e.g. `300`",
20
+
optional: true,
21
+
},
22
+
height: {
23
+
type: "integer",
24
+
label: "Height",
25
+
description: "The new height of the image, e.g. `300`",
26
+
optional: true,
27
+
},
28
+
background: {
29
+
type: "string",
30
+
label: "Background",
31
+
description: "The background color to apply on transparent areas of the image, as a named color or RGB(A) value, e.g. `blue` or `8B0`",
32
+
optional: true,
33
+
},
34
+
opacity: {
35
+
type: "integer",
36
+
label: "Opacity",
37
+
description: "The opacity level to set for the image, from 0 to 100",
38
+
optional: true,
39
+
min: 0,
40
+
max: 100,
41
+
},
42
+
transformations: {
17
43
type: "object",
18
-
label: "Options",
19
-
description: "The image transformation options to apply and/or the URL parameters supported by Cloudinary API. For all transformation options, please check [Image transformation API reference](https://cloudinary.com/documentation/image_transformation_reference), for URL parameters, please check [Transforming media assets using dynamic URLs](https://cloudinary.com/documentation/image_transformations#transforming_media_assets_using_dynamic_urls)",
44
+
label: "Additional Transformations",
45
+
description: "Additional transformations to apply to the image. [See the documentation](https://cloudinary.com/documentation/transformation_reference#co_color) for all available transformations. Example: `{ \"angle\": 90, \"color_space\": \"srgb\"}`",
0 commit comments