Convert PPTX to HTML with Images in Separate Folder/Files rather than Embedded in HTML

Hi there,

I am trying to optimize the file sizes of outputted PPT>HTML presentation files. I am hoping to do this by sending images out into separate files, which would then be called upon using standard tags in the HTML. My current HTML options provided to Presentation.Save() looks like this:

            ResponsiveHtmlController controller = new();
            HtmlOptions htmlOptions = new()
                HtmlFormatter = HtmlFormatter.CreateCustomFormatter(controller),
                JpegQuality = 100,
                PicturesCompression = PicturesCompression.DocumentResolution,
                SlideImageFormat =
                        new SVGOptions
                        ExternalFontsHandling = SvgExternalFontsHandling.Embed,
                        JpegQuality = 100,
                        PicturesCompression = PicturesCompression.DocumentResolution

The resulting HTML looks pretty good, but images come out like this

<image width="480" height="529" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAAN ...

Basically, it’s outputting the images as a long inline string in the HTML. Is there any way to create standard image tags like:

<img href="./images/somefile.png" />

which then link to a separate image file, for all images in the auto-generated HTML?

I am sure it’s something I’m missing about SlideImageFormat or something. Any help would be appreciated.

Thanks much,

Thank you for your question. As far as I can see, Aspose.Slides does not have the ability to store images for output HTML documents in separate files. I’ve added a ticket with ID SLIDESNET-43379 to our issue tracking system. Our development team will consider implementing such a feature. You will be notified when the issue is resolved.

The following article shows you how to save images into separate files when converting a PowerPoint presentation to an HTML document. I hope this will help.