This is my second website I am building with craft cms and I have no prior experience with Twig.
I have had a particular issue with echoing image assets from a singles entry.
The line I copied from my previous website with craft was;
<div id="teamsimagebg" style="background-image:url({% if entry.teamImage1 | length %}{% for asset in entry.teamImage1 %}{{ asset.url }}{% endfor %}{% endif %});"></div>
Field handles were updated correctly and yet on the template page the image is not displayed.
After looking into this I found the following;
{% set asset = entry.teamImage1.first() %}
{% if asset %}
{{ asset.url }}
{% endif %}
This had no effect either.