[BUG] regex includes image resize modifiers
DanArcherOnline opened this issue · 1 comments
DanArcherOnline commented
The Problem
The regex below includes image resize modifiers.
I don't know the official name, but an image resize modifier is when you prefix |<new image width>
to a markdown image link.
In my case, the I am using ![[Pasted image 20220602231944.png|300]]
to make my image 300px wide.
I often do this to stop the images from taking up huge amounts of space.
imageUrl
is being set to my/assets/path/Pasted image 20220602231944.png|300
, but this is not the correct path because it contains the image resize modifier.
You can see the encoded characters after the .png
in the screenshot below
Possible Solution
remove the image resize modifier text (\|\d+
) before assigning to imageUrl
Proshyak commented