Automatically Crop Image to Fixed Size Using Jotform Widget

Is there a way that I can set either the jotform widget or uploadcare to automatically size all images submitted to a fixed dimension (i.e. 400 px x 300px)? I know how to set the widget so the user can only crop to those dimensions, but I need it to happen without the user doing it.

Thanks!

Hi @douglasjerum :wave:

Yes, it’s possible, and there are to ways to achieve that.

1. Image shrink

You can enable image shrink and set 400x300 as the desired output.

Note that image shrink preserves the original aspect ratio, so the output dimensions might slightly differ from the value you set. Also, if the resolution of the input image is not at least 2x larger than the output value, the image won’t be shrunk.

2. Resize

You can automatically add image processing operations to CDN URLs returned by the widget with the custom string option

image

You can add the resize operation with “400x300” value to get resized versions of images on the output. Note that it can lead to stretched output images since the operation doesn’t preserve the original aspect ratio. However, the stretch operation gives you control over resizing behavior.

Hope that helps.