title: Symfony2 & Twig - theming file upload widget
body: <p>I have an Symfony2 edit form for an entity and one of the fields is for the user's profile picture. </p>
  
  <p>I'm trying to theme the Twig file upload widget so that the current picture set for the field is displayed above the file input.</p>
  
  <p>So far, I have:</p>
  
  <pre><code>{% form_theme edit_form _self %}
  {% block field_widget %}
      {% set type = type|default('text') %}
  
      {% if type == 'file' %}
          &lt;img src="{{ value }}" /&gt; 
      {% endif %}
  
      {{ block('form_widget_simple') }}
  {% endblock %}
  </code></pre>
  
  <p>All works well except that the value variable is blank (which makes sense I guess).</p>
  
  <p>My question is how can I get hold of the path to the file? Is there a way to pick it out of the form values for the field? Could I perhaps pass it through as an option to the field?</p>
  
  <p>Srz if this is a dumb question, still pretty new to Symfony and Twig..</p>