Restoring ![]() functionality for images in /assets, with render-image.html

I was initially under the impression that you cannot use the ![]() workflow with images that are in assets (only images that are in static).

This has been asked before here: How to show images on post pages if they're located in the assets folder? - #15 by colorizer

This post suggests that it is possible to recover this functionality with a custom render-image.html file: Watermarking images with HUGO | Aditya Telange

Assuming that I want to keep all images in assets/images, and I want the ability to write markdown as if those files were also in static/images (no image processing, just finding the file), could someone help me with the minimum viable render-image.html that would achieve this? (My guess is that this is just a few lines of code, I just have no idea where to start.)

This is the closest thing I can find, but Iā€™m still confused and would appreciate some help: Fingerprinting image assets with pure markdown templates? - #4 by sephore

Thank you!

This might help:

wow, thank you so much! their example for layouts/_default/_markup/render-image.html worked on the first try without any modification.

(edit: thank you @jmooring )

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.