Img.src = src Draw an image with a certain size on a Canvas ctx.drawImage(image, 0, 0, 1024, 576) Fill content of a canvas into an image $('#outputImage').attr('src', canvas.toDataURL("image/jpeg")) The image will be filled with base64 encoded data Demo
Resizing an Image with Javascript is fairly simple, the key points are: How to create an Image Object var img = new Image() One advantage of this approach, is of course, the smaller upload size. After the image is resized, you can upload it with ajax and store it on the filesystem of your server. It basically boils down to the question if you need to support anything lower than IE 9. If you choose this approach you must be aware that it will only work on Browsers that support Canvas.
I decided to resize the images in the client with Javascript. Image resizing in JavaScript - Using canvas element The HTML