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
{{ message }}
Repository navigation
Offer the ability to create relative references to image files #2560
Typora has an option "Use relative path if possible" which is critical. It will insert a relative path to the file instead of an absolute path when it is stored in a relative path such as "assets". This means that if you move the document and its images to a different location, images continue to work. Mark Text only seems to insert absolute paths which makes it very hard to move things around.
What problem does this feature solve? [optional]
It makes it possible to easily move and share documents with their related images.
Additional context [optional]
You can see the related option in Typora title "Use relative path if possible" below:
With this setup, if I were to paste a screenshot into an example document, it would render:
Yes, huge problem. You paste an image into the document (relative path is "./assets/"), then push it to github and the image cannot be found as the server does not know the absolute path for sure.
Unfortunately I don't think there's any explicit plan to implement this feature. So, currently it may be quite a pain, especially for Typora users, if you want to insert a bunch of images in your documents.
I think that even if it is not possible to support the automatic use of relative paths, it should support the resolution of relative paths, or at least manually change them to relative paths.
But now when you manually change to a relative path, the picture cannot be displayed.
You can select this behavior via Settings -> Image. Select "Move to designated local folder" and activate "Prefer relative assets folder". But I think the current stable version has a bug that this may fail that was already fixed on develop.
Activity
wernerdaehn commentedon Apr 23, 2021
Yes, huge problem. You paste an image into the document (relative path is "./assets/"), then push it to github and the image cannot be found as the server does not know the absolute path for sure.
teopost commentedon May 5, 2021
+1
carmolim commentedon May 13, 2021
+1
carmolim commentedon May 13, 2021
+1
Lulu300 commentedon Jun 4, 2021
+1
ytianxia6 commentedon Nov 30, 2021
+1
So is there a plan to solve this problem?
YalandHong commentedon Nov 30, 2021
It's strange. The developer said:
But I can't figure out how to do so. MarkText always uses absolute path.
YalandHong commentedon Nov 30, 2021
Unfortunately I don't think there's any explicit plan to implement this feature. So, currently it may be quite a pain, especially for Typora users, if you want to insert a bunch of images in your documents.
ytianxia6 commentedon Nov 30, 2021
I think that even if it is not possible to support the automatic use of relative paths, it should support the resolution of relative paths, or at least manually change them to relative paths.
But now when you manually change to a relative path, the picture cannot be displayed.
YalandHong commentedon Dec 2, 2021
Also related to #2652
fxha commentedon Dec 22, 2021
You can select this behavior via
Settings -> Image. Select "Move to designated local folder" and activate "Prefer relative assets folder". But I think the current stable version has a bug that this may fail that was already fixed on develop.Relative to file is duplicate of #2559.
fgimian commentedon Jan 19, 2022
I can confirm this works perfectly in the latest develop version, thanks!
gimmi commentedon Jan 25, 2022
Is it possible to have a pre release available for download?