title: how to remove the selected images from preview?
body: <p>I have found a code on internet to upload multiple images. While you select the image, it will show the selected image just below as preview, now the problem is what if I selected the wrong image and I want to remove that particular image, also no more than 4 image should be allowed
  hope you get what I want to say below is the code</p>
  
  <pre><code>&lt;input type="file" multiple id="gallery-photo-add"&gt;
  &lt;div class="gallery"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>and jquery for the code is</p>
  
  <pre><code>    $(function() {
      // Multiple images preview in browser
      var imagesPreview = function(input, placeToInsertImagePreview) {
  
          if (input.files) {
              var filesAmount = input.files.length;
  
              for (i = 0; i &lt; filesAmount; i++) {
                  var reader = new FileReader();
  
                  reader.onload = function(event) {
                      $($.parseHTML('&lt;img&gt;')).attr('src', event.target.result).appendTo(placeToInsertImagePreview);
                  }
  
                  reader.readAsDataURL(input.files[i]);
              }
          }
  
      };
  
      $('#gallery-photo-add').on('change', function() {
          imagesPreview(this, 'div.gallery');
      });
  });
  </code></pre>