Separate the image url creation to own function