How to convert html file with image to docx

I have a requirement of converting file( html / jpeg ) to word
for which I am using aspose java

for base I have a ByteArrayOutputStream which I want to save as docx
I wrote it like this

InputStream inputStream = new ByteArrayInputStream( baos.toByteArray() );

LoadOptions loadOptions = new LoadOptions();
loadOptions.setLoadFormat( LoadFormat.HTML );
com.aspose.words.Document doc = new com.aspose.words.Document( inputStream, loadOptions );
doc.save( "C://ConvertedDocument.docx", SaveFormat.DOCX );

But this is creating document with text only

Please guide me for saving images in the docx

@kmehta

In your case, we suggest you please use base64 format images in the input HTML. If you still face problem, please ZIP and attach your input HTML document here for testing. We will investigate the issue and provide you more information on it.