for
and with
{% if entry.assetsField.exists %}
<img src="{{ entry.assetsField.one().url }}" alt="">
{% endif %}
{% for asset in entry.assetsField.limit(1).all() %}
<img src="{{ asset.url }}" alt="">
{% endfor %}
{% set featuredImgSrc = 'resources/nope.jpg' %}
{% set featuredImgAlt = 'Nope' %}
<img src="{{ featuredImgSrc }}" alt="{{ featuredImgAlt }}">
{% with {
src: 'resources/yep.jpg',
alt: 'Yep!',
} %}
<img src="{{ src }}" alt="{{ alt }}">
{% endwith %}