{% for gridElement in element.contentGrid.all() %}

{% set image = gridElement.image.one() %}

<div class="content-grid {% if loop.index is even %} reverse {% endif %}">
    <img class="content-image" src="{{image.url}}" alt="">
    <div class="content-text">
        {{ gridElement.text }}
    </div>
</div>
{% endfor %}