media link in templates fix