moved remote image fetch code to helper lib