I am looking to set a default image to the img tag in case the user has not selected a profile picture for their account.
Here is the current output: http://jsfiddle.net/LvsYc/2973/
Check out the default image here:
This is the script being used:
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);
});