get images URL in a twig template
As an alternative configuration using Field Collections. Instead of using two content types and a field reference...

{% for item in content.field_slide %}
&lt;a href="{{ item.getFieldCollectionItem().field_link.0.url }}"&gt;
    &lt;figure class="my-class {% if loop.first %}{{ 'first-class' }}{% endif %}  {% if loop.last %}{{ 'last-class' }}{% endif %}"&gt;

        &lt;div class="my-image-wrapper"&gt;

            &lt;img src="{{ file_url(item.getFieldCollectionItem().field_slide_image.0.entity.uri.0.value) }}" alt="{{ item.getFieldCollectionItem().field_slide_image.0.alt }}" title="{{ item.getFieldCollectionItem().field_slide_image.0.title }}" /&gt;

        &lt;/div&gt;

        &lt;h2&gt;{{ item.getFieldCollectionItem().field_h2.0.value }}&lt;/h2&gt;
        &lt;figcaption&gt;{{ item.getFieldCollectionItem().field_p.0.value }}&lt;/figcaption&gt;

    &lt;/figure&gt;
&lt;/a&gt;
{% endfor %}


This is off the top of my head so double check the code.

Then you just create a field collection field on the home page content type called slide. Go to field collections, select "slide" and add the fields: link, slide_image, h2, and p.