more flexible way to return images from S3, other servers