Link: Hugo: render hooks and partial for displaying images
Source: Hugo: render hooks and partial for displaying images at Pretty Good Hat:
Markdown render hooks allow for adding customization to the default markdown to html rendering in hugo. When placed in _default/_markup/render-image.html, this example overrides the standard rendering of images from markdown to include a call to Glightbox.