clean up __getImageUrl function def