Resize Image
Description
This action resizes your Image File, e.g., by px (pixels), centimeters or percentage.
Supported formats (input and output):
- JPEG / JPG
- PNG
- TIFF
- GIF
- BMP
- SVG
Input Arguments
Input Argument | Type | Description | Required? | Advanced Option? | Default |
---|---|---|---|---|---|
Image File | The image as an Object | The image file you want to resize. Allowed formats are JPEG, PNG, TIFF, GIF and BMP. The format wil be recognized automatically. File only – no string/Base64 allowed | ✔️ | ❌ | - |
Image Width | Number | The desired width of the output image file you want to resize. If set to 0 , the width will be set automatically. Per default the width stands for pixels - can be changed in the advanced option Resize by. | ❌ | ❌ | 0 (equals Auto) |
Image Height | Number | The desired height of the output image file you want to resize. If set to 0 , the height will be set automatically. Per default the height stands for pixels - can be changed in the advanced option Resize by. | ❌ | ❌ | 0 (equals Auto) |
Resize by | Choice Field | Unit of width and height. Allowed entries are %, cm and px (pixels). | ❌ | ✔️ | px will be used if no value entered |
💡
We recommend to only set one of the two options width and height by yourself to avoid a distorted image. If you set only one of these two options the other one will be used to keep the side ratio of the image.
Response
Response | Type | Description |
---|---|---|
File response | File | The resized image file (binary response). |
File response as string | String | Base64-encoded string representation of the resized image. Useful for storing the image in variables. |
MIME type | String | The MIME type of the output file, e.g. image/jpeg, image/png. |
Extension | String | File extension of the resized image, e.g. jpeg, png, etc. |
Power Automate Examples
Reduce the height by 50 %
We use our Power2Apps logo which we have stored in our SharePoint. This picture has a resolution of 624 * 624 px.
We choose 50
as the width and set Resize by to %. We leave the height as 0
.
This means that the our height is set automatically accordingly to our entered width.
All entries except a 0
(Auto) or 50
would lead to a distorted image.
Since we are okay with getting a jpg, we can leave the Format field blank.
To save it in SharePoint you need to choose File response as the File Content setting.
Known Limitations
⚠️
If you experienced other limitations please get in touch with us!