Added better handling of download from s3 to images.
Merge branch 'test' into dev