Lepozepo / cloudinary

MIT License
94 stars 42 forks source link

Reduce image size before uploading #17

Open liut2 opened 9 years ago

liut2 commented 9 years ago

Hi, Thanks for your effort to write this package. I just have a question to ask: How can I reduce the file size before uploading. For example, I allow the user to upload image directly from their phone and usually a picture would take about 3 or 4 MB because its width and height are around 2000x4000. But what I really need to display in the browser when rendering it is 273x375. So what should I do to reduce the picture size to what I mentioned so that I won't end up with a super larger image size which takes much of my bandwith. Thank you very much.

Lepozepo commented 9 years ago

I haven't tried to do something like that but this might point you in the right direction: https://hacks.mozilla.org/2011/01/how-to-develop-a-html5-image-uploader/ Cloudinary's plugin doesn't seem to have anything to manage that before uploading.