implement downloadImage method in LibraryAPI class