-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images not exported in "export as HTML" #142
Comments
I see this as well. |
Please provide a sample Vault for this issue. By design all images should be exported as well |
I don't have a repro vault yet, but the error I see when exporting is that it is looking for the images at the vault root. It fails after the first image.
I imagine the issue might be using the vault base path for embeds instead of the folder where the presentation is? |
My images were stored in a subfolder folder on the root, not on the same folder as the presentation note. I've now moved the file to the same folder where the presentation note is located and it is exported correctly. I woud prefer to keep all my images in a subfolder of the roote |
Even when my presentation is in the same folder as the pictures, the pictures don't get exported. |
Yeah currently i use the base directory of the vault as root. This is needed since most of the ObsidianAPI calls use it as reference point for the vault.I've decided to use the Obsidian API and not the system API to be compatible with multiple operating systems out of the box. I plan to standardize advanced slides more and more to be able to use it on android or ios devices. Therefore i have to make a cut as boundary for the upcoming releases. @stefanopagliari Did you tried to create a symlink in your vault that points to the image directory? And reference the Images through the symlink? Im not sure if it will work, since i didn't test is, but that would my first attempt for an workaround. |
I think symlinks only work to files external of obsidian. |
Yes.. this is the source of the issue. I also keep images elsewhere (and I have a lot of different slides in the same repo.. ) So, my image paths are like this:
Feels like the better starting path is the folder containing the presentation, as the preview renders correctly... OH! also, I think there is a better API you can use to resolve the image path: |
@MSzturc the plugin seems to work fine now in exporting pictures that are located in a designated subfolder folder of the root. I'm not really sure what triggered this change but the issue is closed for me. |
@stefanopagliari Good to hear ;-)
I've designed the behaviour this because Obsidian has the option to save all media files in a central directory. I don't want to impose a workflow to the user so i've decide to give advanced slides the same image handling that obsidian has. |
From a quick look at the code it looks as if it uses the base directory and doesn’t use the attachment directory though. |
The path for attachments would be |
I would be happy to work around the issue if a way exists, but I haven't found any way to export the SVG I'm referring to in my slides. I tried putting the SVG in the same folder as the slides' note MD, and in a separate folder in the same vault. When I export to HTML the slides are intact but the SVG is missing. |
I noticed the Obsidian setting for placing attachments in the vault root was in effect when I was experiencing this issue. I was finally able to export images with HTML by first organizing all files into a folder and changing the Markdown to reference the new relative paths within the folder. |
Same here. Images only work if in the root directory or subfolder of the root |
My intended workflow consists of preparing slides in Obsidian using this plugin, "exporting to html", and uploading to my website the folder exported by the plugin.
I've noticed that the images located inside the Obsidian vault that are embedded in the slides are not exported automatically. As a result, they are not visible online.
Is there a workaround besides manually copying and pasting the images from the Obsidian vault to the folder in which they are exported?
Thank you for your help
The text was updated successfully, but these errors were encountered: