You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{% if src %}
{# If the image's URL is internal to the site... #}
{% if src is not starting_with("http") %}
{# ... then prepend the site's base URL to the image's URL. #}
{% set src = get_url(path=page.colocated_path ~ src) %}
{% endif %}
<figureclass="{% if position %}{{ position }}{% else -%} center {%- endif %}">
<imgsrc="{{ src | safe }}"decoding="async"loading="lazy" />
</figure>
{% endif %}
Environment
Zola version: 0.19.2
Expected Behavior
Image URLs on this page evaluate to: {base_url}/wtf-8/{src}.
Current Behavior
Image URLs on this page evaluate to: {base_url}/pages/wtf-8/{src}.
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
For some reason,
page.colocated_path
evaluates to the path as ifpage.path
wasn't set.Here's the relevant page:
And the relevant shortcode:
Environment
Zola version: 0.19.2
Expected Behavior
Image URLs on this page evaluate to:
{base_url}/wtf-8/{src}
.Current Behavior
Image URLs on this page evaluate to:
{base_url}/pages/wtf-8/{src}
.Step to reproduce
zola serve
locallyThe text was updated successfully, but these errors were encountered: