How to create a multiple image preview via "multiple input" html?

1

I found this code on the net, it works fine. But how can I adapt it to receive multiple images?

  <input type="file" accept="image/*" onchange="loadFile(event)"><img width="100px" height="100px" id="output"/>

<script>
     var loadFile = function(event) {
          var reader = new FileReader();
          reader.onload = function(){
            var output = document.getElementById('output');
            output.src = reader.result;
          };
          reader.readAsDataURL(event.target.files[0]);
        };
      </script>
    
asked by anonymous 06.04.2016 / 02:16

0 answers