title: Symfony 4 webpack + encore handle image in template
body: <p>Using Symfony 4 with Webpack + Encore + Yarn, I want to handle images in my templates, and I am not really how to achieve this. </p>
  
  <p>I put my image in my <code>/assets/img/logo.png</code> folder, and use this in my <code>webpack.config.js</code>:</p>
  
  <pre><code>.addEntry('logo', './assets/img/logo.png')
  </code></pre>
  
  <p>And after I run :</p>
  
  <pre><code>yarn run encore dev
  </code></pre>
  
  <p>Which generates <code>/public/build/logo.js</code> and <code>/public/build/images/logo.aez323a.png</code> files. </p>
  
  <p>My question, is there a way to link Symfony <code>asset()</code> function to the file name with the hash in the filename ? or should I use other way to use the image in my templates ? </p>