{% embed "forms/fields/select/select.html.twig" %}

    {% block input %}
        {% if not field.options and value %}
            {% set field = field|merge({options: {(value): value}}) %}
        {% endif %}
        {{ parent() }}
    {% endblock %}

    {% block global_attributes %}
        data-grav-filepicker
        data-name="{{field.name}}"
        {% if field.preview_images %}data-preview-images{% endif %}
        data-value="{{value}}"
        {{ parent() }}
    {% endblock %}
{% endembed %}
