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

Free Support Forum - aspose.com

Images with absolute path but no scheme are not saved

Hi, we have noticed that images are getting lost when using Aspose.Words to load an html document that has images with a schema-less absolute paths. Here is an example of the image element:

<img src="//upload.wikimedia.org/wikipedia/commons/thumb/c/ce/Division_of_MELBOURNE_2016.png/270px-Division_of_MELBOURNE_2016.png">

Note that we are setting the baseUri as part of the LoadOptions constructor… like this:

new HtmlLoadOptions(LoadFormat.Html, null, "https://en.wikipedia.org/wiki/Division_of_Melbourne")

We are saving the document back to html with the option to ExportImagesAsBase64, like this:

new HtmlSaveOptions(SaveFormat.Html) { ExportImagesAsBase64 = true }

I would have expected Aspose.Words to get the scheme from the baseUri (https) and use that to retrieve the image, but it’s not doing that and the result is an image with a red X.

Thanks

@mdesousa75,

We have logged your requirement in our issue tracking system. Your ticket number is WORDSNET-17894 . We will further look into the details of this requirement and will keep you updated on the status of the linked issue.

@mdesousa75,

Please disregard my previous message. We are still investigating the solution to this problem and will keep posted on further updates. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-17894) have been fixed in this Aspose.Words for .NET 19.4 update and this Aspose.Words for Java 19.4 update.