Skip to content
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

export html linux (.deb) version do not show bg images #467

Open
spideryzarc opened this issue Nov 1, 2024 · 3 comments
Open

export html linux (.deb) version do not show bg images #467

spideryzarc opened this issue Nov 1, 2024 · 3 comments

Comments

@spideryzarc
Copy link

The preview below displays perfectly, but when exported to HTML, the background image is missing (even in local exports). The same .md file exports correctly on the Windows version.

Additional Information:

VSCode Version: code_1.95.1-1730355339_amd64.deb
Linux Distribution: KDE Neon 6.2 (fully updated)
Image Path: Verified as correct

test.md
test.html.txt

@yhatt
Copy link
Member

yhatt commented Nov 1, 2024

The exported HTML preserves the Markdown specify image path images/knapsack.jpeg. Web browser will resolve the image path from the location of file when browsing HTML, so you should export HTML to the correct location.

.
├── images/
│   └── knapsack.jpeg
├── test.md
└── test.html

If the image location is already confirmed as correct, check your browser's restrictions for HTML location. For example, if your KDE is working on Ubuntu, installed browsers may be a snap app. Because of security, some browsers restrict reading resources from local (file:///).
https://askubuntu.com/questions/1435757/firefox-cant-open-files

@yhatt yhatt added the question 🙅 Not issue, just a question (should post to Marp discussion) label Nov 1, 2024
@spideryzarc
Copy link
Author

Thank you for your attention, @yhatt.

This isn’t an issue with an incorrect image path or browser permissions. I’ve tested in different browsers with the same result, and even uploaded the export to GitHub Pages, where the image still doesn’t display.

However, when I export using the Windows version, everything works as expected—both locally and on GitHub Pages.

Thanks again for your help!

@yhatt
Copy link
Member

yhatt commented Nov 3, 2024

If the browser is unable to display images, there should be some kind of error output on the browser. Open the browser’s developer tools, go to the Network tab, and check why the image resources are failing to load.

If possible, sharing a minimal reproducible example on GitHub Pages could help in identifying the cause of the issue.

@yhatt yhatt added need more info and removed question 🙅 Not issue, just a question (should post to Marp discussion) labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants