To create an absolute path for a resource without hard coding the host-name, simply prepend the path with
to the relative path.1
{{ site.url }}
See the code below for an example.
<figure>
<a href="{{ site.url }}/images/tetsImage_a.png">
<img src="{{ site.url }}/images/testImage_b.png" alt="">
</a>
</figure>