
function onImgError(source) {
  source.src = "images/broken.jpg";
  // disable onerror to prevent endless loop
  source.onerror = "";
  return true;
}