822
Views
15
Comments
Image Resize client action for Mobile App?
Question

Hi, on my requirement I need to have user sign up and getting their profile photo from camera.

But on modern smartphone, camera resolution so high that it create time-out when sending to server.

I have Image Resize server action to resize it before saving to database, but it will be better to resize image on client side before sending to server.

I only found Cropper mobile plugin which only crop, not resize the image.

Any ideas?

Thanks and Regards.

2016-11-20 11-27-52
João Neves

Hi Harlin,

You will have to use a Javascript node and some JS magic:

Check out this for example: https://stackoverflow.com/questions/19262141/resize-image-with-javascript-canvas-smoothly

UserImage.jpg
Harlin Setiadarma

Thanks, but I'm not JS guys...

I'm looking for mobile client plugin if available.

I will pass this to my team and hopefully can find a JS Guru to wrote plugin for this.

2024-03-25 06-19-08
Harlin Setiadarma

Eric Halim wrote:

Harlin,

Check this out

https://www.outsystems.com/forge/component/1393/cropper-mobile/

What I need is resizing profile picture image, is this cropper mobile plugin also can be used for resizing images?

Thanks.

2017-02-23 11-12-25
Eric Halim

That's true. Sorry that was cropper not resizer.

So I think it should be a cordova plugin then, like this one https://www.npmjs.com/package/cordova-plugin-image-resizer then wrap it on Outsystems.

Never tried it myself but that's the way it's supposed to be. :) worth to try

2024-03-25 06-19-08
Harlin Setiadarma

For P10 mobile app, I gladly present my new Image Utils Mobile component in Forge:

https://www.outsystems.com/forge/2078/


Resize (while maintaining aspect ratio), Crop, and Identify width/height of image binary data.

All works client-side, before sending image to server...

2018-11-06 14-26-44
Suraj Borade

Thanks Harlin

UserImage.jpg
Nave Jothi

Hi guys,

I am facing the issue for portrait images in cropper, When we take a picture in portrait mode, In Cropper preview image has changed the landscape,How solve this issue. This issue only for iphone



Thanks,

Nave

2024-03-25 06-19-08
Harlin Setiadarma

Nave Jothi wrote:

Hi guys,

I am facing the issue for portrait images in cropper, When we take a picture in portrait mode, In Cropper preview image has changed the landscape,How solve this issue. This issue only for iphone



Thanks,

Nave

Try fixing image orientation first, then crop it. 


UserImage.jpg
Nave Jothi

Harlin Setiadarma wrote:

Nave Jothi wrote:

Hi guys,

I am facing the issue for portrait images in cropper, When we take a picture in portrait mode, In Cropper preview image has changed the landscape,How solve this issue. This issue only for iphone



Thanks,

Nave

Try fixing image orientation first, then crop it. 


Hi,

Thanks for reply, where to set image orientation Css or cropper preview option, Can you please explain deeply


2024-03-25 06-19-08
Harlin Setiadarma

Nave Jothi wrote:

Hi guys,

I am facing the issue for portrait images in cropper, When we take a picture in portrait mode, In Cropper preview image has changed the landscape,How solve this issue. This issue only for iphone



Thanks,

Nave

What plugin did you use exactly? 

Cropper plugin or Image Utils plugin? 


UserImage.jpg
Nave Jothi

Harlin Setiadarma wrote:

Nave Jothi wrote:

Hi guys,

I am facing the issue for portrait images in cropper, When we take a picture in portrait mode, In Cropper preview image has changed the landscape,How solve this issue. This issue only for iphone



Thanks,

Nave

What plugin did you use exactly? 

Cropper plugin or Image Utils plugin? 



Cropper plugin

2024-03-25 06-19-08
Harlin Setiadarma

Nave Jothi wrote:

Harlin Setiadarma wrote:

Nave Jothi wrote:

Hi guys,

I am facing the issue for portrait images in cropper, When we take a picture in portrait mode, In Cropper preview image has changed the landscape,How solve this issue. This issue only for iphone



Thanks,

Nave

What plugin did you use exactly? 

Cropper plugin or Image Utils plugin? 



Cropper plugin

Maybe it's better if you asked in Cropper plugin discussion. 


2021-09-10 14-03-53
Salman Ansari

Hi Harlin,


You can use below component.it will compress the image size.

We have used in 2 project and working fine.

https://www.outsystems.com/forge/component-overview/2347/image-compress


Thanks,

Salman

2020-09-01 15-44-07
Shivani Jindal

Hi,

Forced CSS works well where you can control width and keep height as an auto. It will help to maintain aspect ratio without affecting quality or size.

For image compress and other things, https://www.outsystems.com/forge/component-overview/7180/image-utils-reactive works very well for Mobile apps in both online and offline mode.

Style for upload:

"display: block;
width: 200px;
  height: auto;
  position: relative;
overflow: hidden;"

Style for Image:

"display: block;
  width: 100%;
  height: auto;
object-fit: contain;"
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.