public ActionResult Avatar(Guid patientId) { byte[] bytes = _patientService.Avatar(patientId); if (bytes == null) { bytes = System.IO.File.ReadAllBytes(Server.MapPath("/Content/img/nopatient.png")); } return(File(bytes, "image/png")); }