title: Rollup.js bundling images
body: <p>In webpack world I can bundle and access images as urls in the following way using <a href="https://github.com/webpack-contrib/file-loader" rel="nofollow noreferrer">file-loader</a></p>
  
  <p>Like so:</p>
  
  <pre><code>const webpackConfig = {
    // ...
    module: {
      rules: [
        {
          test: /\.(jpg|png|svg)$/,
          use: [
            {loader: 'file-loader?name=[path][name].[hash].[ext]'}
          ],
          include: paths
        }
      ]
    }
  }
  </code></pre>
  
  <p>And using it like this on a react component for example:</p>
  
  <pre><code>import foo from 'assets/images/foo.png'
  
  function ReactFunctionalComponent () {
    return (&lt;img src={foo} /&gt;)
  }
  </code></pre>
  
  <p>That would put foo with the path of the image</p>
  
  <p>Is there a way to do the same on rollup js so I can have an image asset as a URL with a hash inside the bundle?</p>