{# Image-rendering macro, used both by templates (directly via import) and indirectly by the `img` shortcode (which forwards to it). #} {% macro render(src, width, alt="", class="") %} {%- set source_path = "static/images/" ~ src -%} {%- set resized = resize_image(path=source_path, width=width, op="fit_width", quality=85) -%} {{ alt }} {% endmacro render %}