Asset colocation within shortcodes

Remove the get_url call and that should work.

<figure>
<img alt="{{alt}}" src="{{ url | safe}}">
<figcaption>{{body | safe}}</figcaption>
</figure>

As for escaping, Tera only escape variables so you don’t need to escape hardcoded urls. In practice your call would be:

{% figure(alt="YM2151 die image.", url="ym2151_die.png") %}
Die image of YM2151 at 20x magnification, full die. The full-size
image is 617MB <a href="https://siliconpr0n.org/map/yamaha/ym2151/mz_mit20x/">Source</a>.
{% end %}