What you can do is process the form field by field and display the image if the value is set.
Say you have an image field name. In Twig, you can access its value through form.vars.value.image . Then it's pretty easy to display the img tag:
{% if form.vars.value.image is not null %} <img src="{{ asset('upload/dir/' ~ form.vars.value.image) }}" /> {% endif %}
Here upload/dir/ is the path where you store your images. If you have a constant for this path, you can use it in Twig:
{{ asset(constant('Acme\\DemoBundle\\Model\\Object::UPLOAD_DIR') ~ '/' ~ form.vars.value.image) }}
An alternative would be to create your own type with your own template:
Edit: I forgot an interesting alternative. You can set up an individual field: http://symfony.com/doc/current/cookbook/form/form_customization.html#how-to-customize-an-individual-field . Here is a draft of what you could do:
{% form_theme form _self %} {% block _object_image_row %} <div class="name_row"> {{ form_label(form) }} {{ form_errors(form) }} {{ form_widget(form) }} {% if form.vars.value.image is not null %} <img src="{{ asset('upload/dir/' ~ form.vars.value.image) }}" /> {% endif %} </div> {% endblock %}
source share