create function to get portal image URL from details - and perform any necessary default URL replacement and https conversion