Refactor API for image download

Now it will be easier to add new source of images