You will see that issue if the src
does not begin with /
, even for a non-resource image.
I believe I faced a problem like this, so I ended up customizing the figure
shortcode to this.
The same should work for your case too (you don’t even need that .GetMatch
step as you are directly using the image file name).