resize image before upload javascript

-