title: How to get path to images generated with webpack encore
body: <p>I have one problem with the images I want to include in my e-mail with phpmailer.
  I have tried to use swift mailer with my symfony app but not works I have tried all configuration (all host all ports all encryption etc) during 3 days I have called them etc without any success. It works in local not in remote env...
  Anyway, let's go back to my problem.</p>
  
  <p>I use webpack with encore (new way of setting assets for symfony4).
  All my images are renamed in the public folder. myimagename.65342324b5.jg I/O myimagename.jpg when I run encore to deploy assets.</p>
  
  <p>The problem is when I want to AddEmbeddedImage </p>
  
  <p>let's supposed I have logo.png in assetsfolder.
  When I deploy assets it is renamed logo.536324324V3.png in public images folder.
  So when I do</p>
  
  <pre><code>$mail-&gt;AddEmbeddedImage('images/logo.png','mon_logo', 'logo.png');
  </code></pre>
  
  <p>and when I want to refer in my html body of the e-mail to 'mon_logo' the image is not loaded because it is not existing only logo.536324324V3.png.</p>
  
  <p>I have 2 options:</p>
  
  <ol>
  <li>First I disable the automatic renaming of my images with webpack
  encore .but I don't know how.</li>
  <li><p>Second: I make this script able to recognise logo.png as
  logo.536324324V3.png. Normally it is automatic with the
  manifest.json generated after the assets deployment, but in my case
  the path of my image is in my controller so I cannot specify that it
  is an asset.</p>
  
  <p>But I cannot do</p>
  
  <pre>  $mail->AddEmbeddedImage(" {{ asset('images/logo.png')}}",'mon_logo', 
      'logo.png'); </pre>
  
  <p>Anyway it makes no sense.</p></li>
  </ol>
  
  <p>So if you have solutions I'll take it:)</p>
  
  <p>Thank you :)</p>