Images: Resize an Image
Use this action to adjust the pixel width or height of JPG, JPEG, PNG or WEBP image file. This action accepts images up to 15,000 Pixels and 15MB.
Use case
Resize any image uploaded to PagerDuty Workflow Automation before using it in other tasks.
- Use this action to meet an applications maximum file size requirements or maximum file dimension requirements.
- Resize a file, then insert it into documents with actions like Word: Create a Word Document, Powerpoint: Populate a Template, and Email: Send an Email.
If an application or system requires strict file dimension requirements, you can set both width and height of an image manually. If it’s important to keep the original image’s proportion, like when uploading a receipt or construction photo, you can scale the image based on a new height or width.
How to configure this action
To resize an image, set the pixel Width and Height you want to resize an image to. In the example below, the original file on the left is 350x450 pixels and the examples on the right show it scaled two different ways, proportionally and non-proportionally

- To scale the image proportionally, set just the width or height. In the top example, the height is set to
200
and the width is left empty. When the action is run, the height becomes200
and the width of the image is automatically scaled to156
to maintain the original image’s proportions. - To scale the image non-proportionally, set both the width and the height. In the bottom example, the height is set to
200
and the width300
. Since the dimensions are not the same proportion of the original image, the output is stretched.
note
- Note: This action accepts images up to 15,000 Pixels and 15MB.
Get the current dimensions of an image without changing the size
Normally, this action outputs the updated width and height of a resized image, based on the new width and height provided. To get the current dimensions of an image without resizing it, leave the width and height fields blank—then the output fields will return the actual size of the image.
This is useful to set up conditions based on image size, or as part of quality analysis to verify incoming files meet a standard width and height.
Fields for this action
-
Image file
- The image to be resized. This will most likely be a reference field to an image uploaded in another field.
-
Width
- Enter the new image width in pixels. To scale height proportionally with the new width, leave Height blank.
-
Height
- Enter the new image height in pixels. To scale width proportionally with the new height, leave Width blank.
-
Output Field Prefix
- This will become the output field name for the new file, and to help keep output fields organized, this will be added to the beginning of each output field name as a prefix as this action may output more than one field.
What will this output?
This action may generate multiple fields. To help keep output fields organized, the prefix above will be added to the beginning of each of the output field names, separated by two dashes. Each field will result as:{{output-field-prefix--output-field}}
. Learn more
Output fields for this action
-
Image
- The original, unedited image file.
-
Output Field Prefix
- The resized image file.
-
File size in bytes
- The new file’s size in bytes. This will be an integer.
-
File extension
- The file extension of the file, such as
png
orjpg
.
- The file extension of the file, such as
-
File type
- The type of the file in IANA
type/subtype
format, for example,text/csv
orimage/png
.
- The type of the file in IANA
-
New Height
- The new height that was set during configuration, or set automatically if scaled proportionally.
-
New width
- The new width that was set during configuration, or set automatically if scaled proportionally.
Get help with a problem or question
If something’s not working as expected, or you’re looking for suggestions, check through the options below.
Can I use this action to determine an image’s size?
To get the current dimensions of an image without resizing it, leave the width and height fields blank—then the output fields will return the actual size of the image.
This is useful to set up conditions based on image size, or as part of quality analysis to verify incoming files meet a standard width and height.
What is the recommended image width for emails?
An email with an image that’s too wide may require horizontal scrolling. If you resize an image for an email, there are two ideal email widths:
- 600px for email on a desktop client
- 320px for email on a mobile device
Any resized image should be based on these recommendations, or your own email campaign configuration, like whether your email adjusts layout based on screen width.
Thanks for your feedback
We update the Help Center daily, so expect changes soon.
Link Copied
Paste this URL anywhere to link straight to the section.