Free Support Forum - aspose.com

How to Skip Images while Importing HTML into Aspose.Words' DOM using .NET

We are using aspose to import a word file from our customers where we parse the content to html. All the images inside the document are uploaded and their corresponding url’s are inserted on each image using Shape.ImageData.SourceFullName.

The problem comes when we save the document to html, it seems like all the images are downloaded which causes the document to take several seconds to finish saving.

Is there a way to avoid that? We basically just need to insert an url instead of an image, I dont understand why the images need to be downloaded before saving.

Hello again,
I stumbled upon the solution here:

You can set ResourceLoadingAction.Skip on Images and aspose won’t download the image when you try to save the document, this just saved me 6-7 seconds on one of our worst document examples :slight_smile:

If you are trying to modify the image’s url check my comment above

@criaraci

It is nice to hear from you that you have found the solution of your query. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.

1 Like