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

feat: add template suffix to image renaming #75

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

BadWinniePooh
Copy link

@BadWinniePooh BadWinniePooh commented Oct 13, 2023

Relates to this issue/enhancement: Allow for templated suffix #62
Also relates to this issue/enhancement: Add an option to set width for pictures #57

@j-adel
Copy link

j-adel commented Oct 15, 2023

Awesome! I've tried it on my vault and it seems to work as expected.

@DivineMK
Copy link

DivineMK commented Jan 12, 2024

I managed to get it working but the behavior is a bit strange. If the new name has less then 7 characters then it is normal (example link: test.png->![[test.png|%]]). However when new name has 7 or more characters, it gets duplicated (1234567.png -> ![[12345671234567.png|%]]).
I wonder if anyone encounter the same issue. It works normally when there is no suffix, or the new name has less than 7 characters.

@BadWinniePooh
Copy link
Author

I'm not entirely sure what caused this bug, but apparently I noticed it also (occasionally).
Usually after a restart/reload of obsidian the bug doesn't occur...

I have done some changes which I will push to the PR, unfortunately I was not able to reliably reproduce the bugs, so I am currently not entirely sure that the bug is fixed. 😉

But I hope with the changes made the bug is now fixed.

@DivineMK
Copy link

DivineMK commented Feb 6, 2024

The issue is fixed! From what I see you fixed it by creating a function to modify the filename but I am curious what was the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants