How to create a preview multiple images via "Multiple input" html?

Asked

Viewed 49 times

1

I found this code on the net, it works well. But, how can I adapt it, to receive several 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>
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.