{% if src %} {# If the image's URL is internal to the site... #} {% if src is not starting_with("http") %} {# ... then convert the page's colocated_path attribute to a string so it can be concatenated... #} {% set colocated_path = page.colocated_path | as_str %} {# ... and use `resize_image` to get image's URL for colocated blog posts and non-colocated blog posts. #} {% set image = resize_image(path=colocated_path ~ src, width=5000, height=5000, op="fit") %} {% endif %} {% endif %}