new function to return image url