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
Input Arguments
Input Argument | Type | Description | Required? | Advanced Option? | Default |
---|---|---|---|---|---|
Width | Double | The desired width of the output image file you want to convert. 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 ) |
Height | Double | The desired height of the output image file you want to convert. 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 ) |
Output format | Choice Field | The output formats you can choose from are JPEG , PNG , TIFF , GIF and BMP | ❌ | ❌ | - (JPEG will be used if no value entered) |
File | The image as an Object | The image file you want to convert. Allowed formats are JPEG , PNG , TIFF , GIF and BMP . The format wil be recognized automatically. | ✔️ | ❌ | - |
Resize by | String | 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 | Description |
---|---|
File response | The image in the chosen format |
File response as string | The compressed image as a base64 string |
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 Limtitations
⚠️
If you experienced other limitations please get in touch with us!