0

I am working on a form with 8 images to be uploaded using the camera capture(in phone) / file upload(in desktop) where each image will be of minimum size 2 MB..

It takes too long to upload the file to the server. I need to upload the images through form submit and not by AJAX..

Is there any way to compress large image and then upload it to server. How can I submit the form where it should take minimum time to submit..

I came across CANVAS with HTML5 but, I don't know whether it will be used for this situation, if it can be used then please give me some example code..

Thank you..

Gokul
  • 2,753
  • 4
  • 19
  • 40
  • Using a canvas would be your best bet, either to reduce the pixel size of the image (work out whether you need it at full resolution, or whether you can scale it down) If that's not an option, you can reduce the quality as shown in the URL @JaromandaX posted. (`canvas.toDataURL("image/jpeg",0.7)`) – DBS Jul 27 '16 at 11:16
  • Thanks for your response @JaromandaX and DBS.. – Gokul Jul 27 '16 at 11:33

0 Answers0