Refactor of flickr to get images