1
votes

Is there a way to resize images client side before upload (when the user clicks the upload button) so that all fields with data-type="image" will execute resizing to the specified dimensions and then commit the upload?

I'm working on a mobile compatible app where users have often to upload images using their mobile camera. It's necessary to reduce the image on client-side to perform quicker uploads of the photos to the server to reduce upload time.

Thanks.

1

1 Answers

0
votes

There is a way to do this with plan JS by using canvas capabilities of HTML5.

Refere to this answer: JavaScript reduce the size and quality of image with based64 encoded code