Use UriExportStrategy with CustomUriExportStrategy and IUriSavingHandler to rewrite resource URIs in the Markdown output. This is useful when images are served from a CDN or a different path than where they’re saved.
Note
URI rewriting works with file-based image strategies (ExportImagesToFileSystemStrategy or CustomImagesStrategy). It has no effect when images are embedded as Base64.
Prepend a CDN base URL
usingGroupDocs.Markdown;publicclassCdnUriHandler:IUriSavingHandler{publicvoidHandle(UriSavingArgsargs){args.SetResourceFileUri("https://cdn.example.com/assets/"+args.ResourceFileName);}}varoptions=newConvertOptions{ImageExportStrategy=newExportImagesToFileSystemStrategy("output/images"){ImagesRelativePath="images"},UriExportStrategy=newCustomUriExportStrategy(newCdnUriHandler())};MarkdownConverter.ToFile("report.docx","output/report.md",options);// Images saved locally to output/images/// Markdown references: 
UriSavingArgs properties
Property
Description
ResourceFileName
Default file name generated by the library
ResourceFileUri
Default URI that would appear in the Markdown
SetResourceFileUri(string)
Override the URI written to the Markdown output
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.