use api to fetch images from server