{% set embedded=True %}
<a href="{{ entity | url }}" class="nav-secondary-action search-result-target">
    <div class="search-result-description">
        {% include ['entity/label--' + entity.plugin_id() + '.html.j2', 'entity/label.html.j2'] %}
        {% include ['entity/meta--' + entity.plugin_id() + '.html.j2', 'entity/meta.html.j2'] ignore missing %}
    </div>
    {% set image_reference = entity.file_references | selectattr('file', 'public') | selectattr('file', 'public') | selectattr('file.media_type', 'image_supported_media_type') | first %}
    {% if image_reference is defined %}
        <div class="search-result-preview">
            <img src="{{ ('betty-static://' ~ image_reference | image_resize_cover((50, 50))) | url }}" class="image"{% if image_reference.file.description %} alt="{{ image_reference.file.description | localize }}"{% endif %}>
        </div>
    {% endif %}
</a>
