kindly check this <https://jsfiddle.net/rhbwpn19/4/>

Image preview is working fine for the first post but not for the other posts.

what should I change here ?

```
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();

reader.onload = function(e) {
  $('#blah').attr('src', e.target.result);
}

reader.readAsDataURL(input.files[0]);

}
}

$("#imgInp").change(function() {
 readURL(this);
});

```

1.click on the dropdown menu and select View.

[![enter image description here](https://i.stack.imgur.com/UITd1.png)](https://i.stack.imgur.com/UITd1.png)

2. It will preview the image. now browse any image from your computer and it will immediately show

[![enter image description here](https://i.stack.imgur.com/Qj2G1.png)](https://i.stack.imgur.com/Qj2G1.png)

3. It works fine.

[![enter image description here](https://i.stack.imgur.com/EfYKS.png)](https://i.stack.imgur.com/EfYKS.png)

4. But not working for the second post/image .
[![enter image description here](https://i.stack.imgur.com/lelhd.png)](https://i.stack.imgur.com/lelhd.png)