mdSilo / mdSilo-app

Lightweight Knowledge Base and Feed Reader.
https://mdsilo.com/
GNU Affero General Public License v3.0
583 stars 40 forks source link

Allow display local image in markdown #363

Open amiyatulu opened 1 year ago

amiyatulu commented 1 year ago

Instead of providing a separate folder for images, please provide any relative path for images.

For example,
biology/Snips.md
biology/SNP.jpg
biology/image/snips.jpg

In Snips.md
![snip](SNP.jpg) 
![snip](image/snips.jpg) 

Renders only alt txt but doesn't render image.

It will help for easy backup of notes and can be viewed in code editor like vscode.

danloh commented 1 year ago

Actually, the relative path for local file is supported, but there is an asset protocol bug on Tauri. refs:

https://github.com/tauri-apps/tauri/issues/6158 , https://github.com/tauri-apps/tauri/issues/3725#issuecomment-1160842638

Seemingly, it's due to webkit's bug?

EDIT: On Windows: need to pin Tauri version on 1.2.1 to support; On Ubuntu22.04/macOS: no support open an issue: https://github.com/tauri-apps/tauri/issues/6962