$(document).ready(function() { $("#js-app-logo").error(function () { $(this).attr("src", ImagePaths.get("user/default.png")); }); });