Get image from related entries asset field I have a "single" entry which has a "entries" field. The related entries have a image field of the "Assets" type.

In the template, i want to display the image from each of the related entries. I figured i could do the following

        {% for relatedImage in entry.relatedImages %}
            {% for images in relatedImage %}
                &lt;div&gt;&lt;img src="{{ images.url }}" alt="{{ asset.title }}" /&gt;&lt;/div&gt;
            {% endfor %}
        {% endfor %}


Though not only does it not work, but it is probably pretty inefficient too. Whilst I'm here, how do people go about inspecting what you get from your vars? Is there a Twig/Craft equivalent to PHP's var_dump('relatedImage')?!

Any ideas most welcome!
Got a solution that is cleaner than nested for loops.

{% set myRelatedImage = entry.relatedImages.first %}


then I can do

&lt;img src='{{ myRelatedImage.images.first.url }}'&gt;


My use case was slightly different. I have a bunch of sermons entries that are related to a series entry. It's the series entry that has the image attached.

This worked very nicely.