Sharing xaringan html files and keeping embedded images

Is there a way to share a finished HTML presentation after compiling? I'm creating my own presentation template to be consistent with my organization's visual identity, however when I share the html file all of the images are stripped.

My .rmd is here:

and the css file is here:

1 Like

I'm showing your images:

Can you say more about what you were expecting?

It works if you compile it, but when I shared the HTML file that it generates the images don't appear. Here's the file that was generated:

If you download it and open in a browser you'll see this:

So when you say "share" you mean you are sending the file as an attachment, rather than sharing a link. You may wish to print to PDF if you want to share as an attachment.


" One distinction of xaringan::moon_reader when compared to other R Markdown output formats is that it does not generate self-contained HTML documents by default (see Section 3.1.9). This means none of the external dependencies such as images or JavaScript libraries will be embedded in the HTML output file by default. Due to technical difficulties (remark.js does not use Pandoc but renders Markdown in real time in the browser), it is hard to implement the self-contained mode well. If you have to publish the slides to a web server, but it is not convenient for you to upload all the dependencies, xaringan may not be a good choice for you. If you use GitHub Pages or Netlify, this may not be a big problem (you commit or upload all files)."

1 Like

Ok, thanks so much for your time.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.