на самом деле проблема в том, что вы используете
$('#blah')
, поэтому каждый раз, когда вы обновляете только один тег изображения, вам нужно соответствующим образом нацелить тег diff img, один из способов сделать это -
Html
<input type='file' onchange="readURL(this, 'blah');" />
<img id="blah" src="http://placehold.it/180" alt="your image" />
<input type='file' onchange="readURL(this, 'blah2');" />
<img id="blah2" src="http://placehold.it/180" alt="your image" />
<input type='file' onchange="readURL(this, 'blah3');" />
<img id="blah3" src="http://placehold.it/180" alt="your image" />
<input type='file' onchange="readURL(this, 'blah4');" />
<img id="blah4" src="http://placehold.it/180" alt="your image" />
теперь вы получаете diff id тега img каждый раз, когда вы выглядите как функция js.
JS
function readURL(input, target) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#'+ target)
.attr('src', e.target.result);
};
reader.readAsDataURL(input.files[0]);
}
}
теперь все работает, удачи