I'm trying to show a default image if the related entry does not have an asset. This if statement is not working. It is instead showing the image from the parent or main entry on the page (the one that has the related entries).

{{ relate:related_towns }}
    <a href="/towns/{{ slug }}">
        {{ if images }}
            {{ asset:images }}
                 <img src="{{ glide:url width="500" }}" />
              {{ /asset:images }}
        {{ else }}
               nada
        {{ /if }}
    </a>
{{ /relate:related_towns }}

Thank you for any help.