title: Rails Webpacker images not loading unless manually defined with import
body: <p>I'm working with @rails/webpacker 3 in a Rails 5.1 app. I've been trying to figure out if there is a way to not have to define importing every individual image in the respective pack/*.js files. </p>
  
  <p>I have the default webpacker config setup and the image file saved at this location.</p>
  
  <pre><code> &lt;app_root&gt;/app/javascript/images/image.png
  </code></pre>
  
  <p>In my view I have the image element set</p>
  
  <pre><code>#&lt;app_root&gt;/app/views/layouts/application.html.erb
  ...
  &lt;img src="&lt;%asset_pack_path 'images/image.png%&gt;"&gt; 
  ...
  </code></pre>
  
  <p>The image will not load unless I import it in the pack files which I do here: </p>
  
  <pre><code>#&lt;app_root&gt;/app/javascript/packs/application.js
  import 'images/image.png'
  </code></pre>
  
  <p>It seems like I'm doing additional unnecessary work to render the image in the application view. I'm assuming that asset_pack_path method and webpacker would be performing this image import since it seems like having to define it twice is duplicate code.</p>
  
  <p>Am I missing something or is this the design intent on how to load images using webpack and rails?</p>