split out image retrieval to separate file to make it easier to customise