You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🚚 Transfered issue from Marpit framework to Marp for VS Code.
In VS Code preview, any resources which were specified in the absolute path will have a different resolution way from other Marp tools, due to the specifcation of the Markdown preview. (The export command also can regard as one of other tools because it's actually using Marp CLI in internal)
In common,  has an exactly same meaning as <img src="/assets/images/combined2.png" />, and regularlly that path points out a local file resolved from the root: file:///assets/images/combined2.png
On the other hand, the root of resources used for VS Code Markdown preview will become the root of VS Code workspace you'are opening. If you were opening /home/username/marp/markdown directory as a VS Code workspace, the preview can show an image located in /home/username/marp/markdown/assets/images/combined2.png with the described absolute path.
Solutions
Use relative path
A thinking about "workspace" is VS Code specific. For interoperability with other Marp tools, we recommend to use a relative path from Markdown file instead.
If you want to stick to use absolute path from the workspace root, you can try to export with turning on an experimentalmarkdown.marp.strictPathResolutionDuringExport setting from the extension preference too. It's useful for getting more consistent result between preview and export.
I have a local png image that I have put onto my slide using the following code:
The image renders fine in the preview window in VS:

However, when I export my desk using

mark: Export my Slide Deck
command, the slide I get in thepdf
file does not have the image:Here is the image I am using:

The text was updated successfully, but these errors were encountered: