{# Image-rendering macro, used both by templates (directly via import) and indirectly by the `img` shortcode (which forwards to it). With `width > 0`: resizes via Zola's image pipeline (file size benefit) but emits no width/height attributes — the theme CSS sizes the image, matching the live Grav site's pattern. Avoiding the HTML width attribute sidesteps a stretch artefact triggered by Bootstrap-3's `img { height: auto !important }` interacting with `.float-right` padding. With `width = 0` (default): emits the raw straight from /static/images/ — same shape, no resize. #} {% macro render(src, width=0, alt="", class="") %} {%- set width = width | int -%} {%- if width > 0 -%} {%- set resized = resize_image(path="static/images/" ~ src, width=width, op="fit_width", quality=85) -%} {{ alt }} {%- else -%} {{ alt }} {%- endif -%} {% endmacro render %}