title: Image resize before upload without preview javascript
body: <p>I want to avoid uploading big/heavy image files.</p>
  
  <p>I prefer HTML5 FileAPI library for this job.</p>
  
  <p>All other functionality is added (upload, re-order, etc.), so I only need the image-resize function.</p>
  
  <p><strong>CASE:</strong></p>
  
  <p>On the page there is an input for multiple files.</p>
  
  <p>On input change event (when adding files), resize the entered images/files and append them to FormData(), then send the FormData() to PHP script via ajax.</p>
  
  <p><strong>EXAMPLE:</strong></p>
  
  <pre><code>$('input').on('change',function(){
     var formData = resizeImages(this.files[0]);   
     uploadResizedImages(formData);
  });
  
  function resizeImages(files){
     formData = new FormData();
  
     //For each image, resize it and append to formData
     //resize file part missing....
     formData.append('files[]',this);//Appending to formData (this = currently iterated file)
  
     return formData;//Return the formData with resized images
  }
  </code></pre>
  
  <p>Anyone?</p>
  
  <p>Thanks</p>