Keeping the original path to images in html

Hi,
I have a document which I save as html in a folder called ‘MyReports’. I need to insert into it, html with images that is generated dynamically. The images are also downloaded dynamically to an images folder under ‘MyReports’, say, ‘MyReports\images’
I’ve noticed that saving the doc copies the images to ‘MyReports’ and changes the ‘src’ attribute of the ‘img’ tag to point to the copy of the image. This creates duplicate copies of the image, one in ‘MyReports’ and one in ‘MyReports\images’.
I’d like to avoid this image redundancy. Is there a way to keep the original path to the image in the html? (and thus eliminating the need to copy the image)
Thanks in advance,
Itai

Hi

Thanks for your request. When you open HTML document using Aspose.Words, HTML document is converted to Aspose.Words DOM. Images in HTML are represented as embedded images, so if you save the document in DOC, DOCX or any other Word document format, images will be embedded.
When you save the document in HTML format, images are saved as a separate files in the folder specified in SaveOption:
https://reference.aspose.com/words/net/aspose.words.saving/htmlsaveoptions/imagesfolder/
In your case, you can alter names of images during saving the document. You can use HTMLExportImagesSaving event handler:
https://reference.aspose.com/words/net/aspose.words.saving/htmlsaveoptions/imagesavingcallback/
Hope this helps.
Best regards,