I haven't used Craft in a while now and I have just revisited it, I'm trying to output an image URL from a global matrix field like so:
{% for block in globalName.matrixField %}
{% if block.type == "blockType1" %}
{% set image = block.blockType1.first() %}
<a href="{{ image.getUrl() }}">link</a>
{% endif %}
{% endfor %}
But it keeps outputting as: {{ siteUrl }}/resources/images/my-image.jpg
(instead of actually outputting the website URL).
Am I missing something?