use stream socket for remove_image when stream=True