We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Coverting image alone to base64 code


I am just wondering, is there a way to convert the image file alone to base64 code using the aspose API.

Many Thanks

can someone help me on this?

Thanks for your request. Do you mean storing images as base 64 in HTML produced by Aspose.Words? if so you can achieve this by setting the option in HtmlSaveOptions:
Hope this helps.
Best regards,

Thanks. I am aware of this, but in my case I am uploading an image itself and expecting the base 64 code for that image from aspose API.

Please let me know your comments.

Thank you for additional information. Aspose.Words does not work with stand alone images. Of course, you can insert your image into a Document and save the document to HTML and then extract base64 representation of the image from this HTML. However, I suppose you can use the approach like suggested will be better:
Best regards,

Thanks, it worked for me anyways.