{% extends 'SonataAdminBundle:CRUD:base_list_field.html.twig' %}

{#{% block field%}
    <div>
        <img src="{{ app.path.product_images ~ product.img | imagine_filter('gallery_element_admin') }}" />
        <img src="{{ vich_uploader_asset(product, 'img') }}" alt="{{ product.name }}" />
    </div>
{% endblock %}#}

{% block field %}
    {#    <img src="{{ object.name }}" width="100" title="{{ object.name }}" />#}
    {#    {% set path = 'public/images/uploads/products/' ~ object.img  %}#}
    <b>Image</b>
    {% if(object.imageName != NULL) %}
        <img src="{{asset('images/uploads/slider/' ~ object.imageName) }}" width="250" title="{{ object.type }}" />
    {% else %}
        No Photo
    {% endif%} <br/>
    {#    {{ object.photo}} #}

{% endblock %}