The first input I can fill in the URL when clicking on an image.
When I add a new input and I click on the image, the URL appears on the button ADD not within the input with focus
https://jsfiddle.net/gislef/wyp4hzrd/
var input = '<label>Nome: <input type="text" name="images[]" /> <a href="#" class="remove">X</a></label></br>';
    $("input[name='add']").click(function( e ){
        $('#inputs_add').append( input );
    });
    $('#inputs_add').delegate('a','click',function( e ){
        e.preventDefault();
        $( this ).parent('label').remove();
    });
var focused = null;
$("input").on("focus", function() {
  focused = $(this);
})
$("img").click(function() {
  if (focused.length)
  focused.val($(this).attr("src"));
})
With fixed inputs I can work properly:
 
     
     
    