title: How to use es6 import for images
body: <p>I'm using es6 and want to import an image to use with webpack. Looking at the <a href="https://github.com/webpack/file-loader" rel="noreferrer">file-loader doc</a>, this is the example they gave:</p>
  
  <pre><code>var url = require("file!./file.png");
  </code></pre>
  
  <p>url will now return something like <code>/static/351f9446b3ba577b6a79e373e074d200.png</code> </p>
  
  <p>This works with require, but how do I use <code>import</code> to do this, I've tried -</p>
  
  <pre><code>import * as url from '../images/151.png';
  </code></pre>
  
  <p>but that doesn't work because url remains undefined. How do I set a variable to what I'm importing when it's an image?</p>