title: Display image stored in BLOB database in symfony
body: <p>I load my image (blob data ) in my GETer Entity
  When I just return ($this->foto) in my GETer I see :Resource id #284 on the screen
  When I change my GETer like this : return stream_get_contents($this->foto);
  I see these : ���JFIF���   ( ,,,,,,,, ( and more )</p>
  
  <p>In my Controller a call the index.html.twig to show all my entities</p>
  
  <pre><code>    /**
   * Lists all Producten entities.
   *
   */
  public function indexAction()
  {
      $em = $this-&gt;getDoctrine()-&gt;getManager();
  
      $entities = $em-&gt;getRepository('CustomCMSBundle:Producten')-&gt;findAll();
  
      return $this-&gt;render('CustomCMSBundle:Producten:index.html.twig', array(
          'entities' =&gt; $entities,
      ));
  }
  </code></pre>
  
  <p>Now in my views ( index.html.twig ) I like to show the picture</p>
  
  <pre><code>       {% for entity in entities %}
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;img  src="{{ entity.foto}}" alt="" width="80" height="80" /&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  {{ entity.foto }}
              &lt;/td&gt;
              &lt;td&gt;
              &lt;ul&gt;
                  &lt;li&gt;
                      &lt;a href="{{ path('cms_producten_show', { 'id': entity.id }) }}"&gt;show&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                      &lt;a href="{{ path('cms_producten_edit', { 'id': entity.id }) }}"&gt;edit&lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      {% endfor %}
  </code></pre>
  
  <p>But I don't see the picture ?</p>
  
  <p>Can anyone help me? </p>