<div class="person"> <div class="image"> {{- $param := . -}} {{- with .image -}} <img src="{{ . }}" {{ with $param.name }}alt="Bild {{ $param.name }}"{{ end }}> {{- end -}} </div>