dy-sh / obsidian-consistent-attachments-and-links

Obsidian plugin. Move note with attachments.
MIT License
228 stars 24 forks source link

How to convert all links to the shortest path when processing a file. #77

Closed HWiwoiiii closed 2 months ago

HWiwoiiii commented 9 months ago

For instance, an image is attached to a file with the shortest link [[image.jpg]] (no path included). When I move the file to another folder, the link automatically changes to [[folder1/folder2/folder3/image.jpg]]. Is it possible to stay in the original link format? (shortest wiki link)

Could you please add a command that allows users to change all links with paths [[folder1/folder2/folder3/image.jpg]] to the shortest [[image.jpg]], deleting all paths in front of the file name?

Moreover, is it possible to only convert internal file links without changing web links?

image

Finally, thank you for this amazing plugin!

mnaoumov commented 2 months ago

Implemented in https://github.com/dy-sh/obsidian-consistent-attachments-and-links/releases/tag/3.0.0