ebullient / obsidian-slides-extended

Create markdown-based reveal.js presentations in Obsidian
MIT License
90 stars 5 forks source link

🐛 Exporting the Presentation does not export embedded images #25

Open Runecreed opened 2 months ago

Runecreed commented 2 months ago

Hello, nice that you're picking up this project again! Was always interested in turning my notes into presentations

I recently gave it a shot and it worked out pretty well; however now that I want to export the presentation and send it to my colleagues the export itself unfortunately did not generate all files necessary to re-visit the presentation for my colleagues.

image

the HTML exported presentation is still pointing to the Obsidian note source reference for images that were embedded

When i use the syntax

![[myImage.png|250x250]]

for the presentation, this image file is not subject for the export generated when clicking on the export to html button

image

this misses some key elements from the presentation if a lot of it is image based ;)

Expected Behavior

When exporting the presentation to HTML, the generated /export directory should also have embedded images sourced, and should point to them in the html version of the slides

Current behaviour

the exported HMTL presentation is attempting to locate embedded images from the ![[..]] obsidian syntax, from the root of your obsidian vault instead of having a copy listed in the /export directory

Steps to reproduce

make a presentation embed an image that is present in your obsidian vault with ![[text.png]] syntax

start slideshow presentation preview export the presentation to HTML

open the index.html page that was generated navigate to the slide that had the image

the image is not going to be found anymore, src is pointing to the wrong path // there is no src of that image in the export directory

Which Operating Systems are you using?

Obsidian Version

v1.6.7

Slides Extended Plugin Version

v2.1.1

Checks

Possible solution

when exporting, also copy any embedded link files into the export and re-establish the src links to them

ebullient commented 2 months ago

As a work around, "open in a browser", and have the browser export it.

ebullient commented 2 months ago

I can not reproduce this on the most recent release. Can you pack up a vault that shows this (with example images + slides)?

This discussion has some example resources that you could use as a starting place. If you could rearrange them such that the export doesn't work for you, that would help:

https://github.com/ebullient/obsidian-slides-extended/discussions/14

ebullient commented 1 month ago

I added some diagnostics in release 2.1.3. Please reproduce with that version. I need to see debug/verbose messages from console.log.

All levels

As an aside, exporting for other folks to use always worked more reliably when done from a browser (even with advanced slides).