title: Dynamically Change image source destination Twig
body: <p>I want to change user profile image for different user.
  I  used following code for add image source</p>
  
  <pre><code> &lt;img src="{{ asset('bundles/dist/img/user4-128x128.jpg') }}" alt="User Image" class="img-circle" /&gt;
  </code></pre>
  
  <p>All images are saved as username in bundles/dist/img/ directory</p>
  
  <p>i try change  image source following manner</p>
  
  <pre><code>&lt;img src="{{ asset('bundles/dist/img/ '~{{ app.user.username }}~'.jpg') }}" alt="User Image" class="img-circle" /&gt;
  </code></pre>
  
  <p>But it is not working ?
  What is the best way doing this ?</p>