I'm wondering how you could approach the next scenario the best:
An user has no clue what the size of an image is and just tries to upload a file with a size of more than 10MB on a website.
We as developers know that this would be a very unwise in certain scopes because of page loading times, bandwith usage, storage space, etc.
Now i thought i could resize the image before uploading it to a server. Let's say i would resize the image to 600x600
.
My question is:
Is there any method that allows the image to be resized before the file will be uploaded and will most likely not result in a 500 error? Good thing to notice it has to work on all browsers and even IE8+ if possible.
Any ideas,approaches or solutions are welcome. I thought about using jQuery-File-Upload
but i think you also will have to send the image to the client first before the resizing can take place and will most likely crash the browser? I'm not sure how to approach this case.