jquery background selected file
$('.form_cabinet .photo input[type=file]').on('change',function(){ var file=this.files[0]; var reader=new FileReader(); reader.onloadend=function(){ $('.form_cabinet .photo .image').css('background-image','url("'+reader.result+'")'); } if(file){ reader.readAsDataURL(file); } });