created function that get image by HttpRequest.