I'm using the stream constructor, which is recommended for larger message parts, so that shouldn't be limiting in itself:
ByteArrayInputStream is = new ByteArrayInputStream(img);
message.addMessagePart(new MessagePart(is, type, "id1", "image", null));
The image file is approx 80 kbytes,