Relative page resource paths in index.html and .Summary

Check out the custom figure shortcode that I share in this post:

The solution is to expand the figure src argument to include the Page Permalink (if it does not begin with /), and not leave it to be relative.