In my Hugo-generated website I'm making use of the built-in shortcode figure. Example:
{{< figure src="myImage.svg" width="100%" alt="Some description" >}}
This renders the following HTML:
<figure>
<img src="myImage.svg"
alt="Some description" width="100%"/>
</figure>
But now I'm trying to update my Hugo website in such way that the figure shortcode adds the loading=lazy attribute to the img tag:
<figure>
<img
loading="lazy"
src="myImage.svg"
alt="Some description" width="100%"/>
</figure>
How can I achieve my goal of letting images be loaded lazily using the (new) loading attribute?