Found a more efficient way of retrieving image urls