hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
39.59k stars 4.86k forks source link

relative path referencing of images #5505

Open chen-qingyu opened 5 months ago

chen-qingyu commented 5 months ago

Check List

Feature Request

Once enabled, an asset image will be automatically resolved to its corresponding post’s path. For example, “image.jpg” is located at “/2020/01/02/foo/image.jpg”, meaning it is an asset image of “/2020/01/02/foo/“ post, ![](image.jpg) will be rendered as <img src="/2020/01/02/foo/image.jpg">.

This makes it impossible to preview images in the local markdown editor like vscode.

Many plugins have been created to solve this problem, such as one I wrote: hexo-markdown-image.

Hope to native support relative path referencing of images: ![](foo/image.jpg).

Others

No response

lmliheng commented 4 months ago

Yes, I have also encountered this problem. Why do some themes write the path as dead 😥😥