changed the cakephp getImagebyID function