I'm trying to do this:
{% for image in entry.illustration %}
{% if image | length %}
<a href="{{ entry.url }}" class="flag__img">
<img src="{{ image.getUrl }}" alt="{{ entry.altText }}" class="profile__image">
</a>
{% else %}
<p>No image.</p>
{% endif %}
{% endfor %}
Without any luck. What would be a good way of telling craft to do something else if entry.illustration does not have an image defined?