simplifying the asset url replacement function