Currently, very large images will break the connection since they are too large to be sent at once. The trick is to break the image into multiple pieces and put them together locally.
I'm not sure how big the actual images are but it could probably be estimated using the width x height x (bytes-per-pixel) and then dividing it into enough chunks so that each is smaller than maximum_request_length.