title: Change image asset path in Webpack config
body: <p>I am having issues with Webpack/Encore where my image URLs are not pulling through correctly.</p>
  
  <p><code>homepage.scss</code>:</p>
  
  <pre><code>body {
      background: #FFEFE2 url("../../img/bg.jpg") no-repeat;
  }
  </code></pre>
  
  <p>The generated markup is:</p>
  
  <pre><code>body {
      background: #FFEFE2 url(/build/images/bg.9f6bc44a.jpg) no-repeat;
  }
  </code></pre>
  
  <p>My application sits under <code>/app</code>, so the correct URL would be <code>/app/build/images/bg.9f6bc44a.jpg</code>.</p>
  
  <p>My Webpack encore config:</p>
  
  <pre><code>var Encore = require('@symfony/webpack-encore');
  
  Encore
  // directory where compiled assets will be stored
      .setOutputPath('web/build/')
      // public path used by the web server to access the output path
      .setPublicPath('/build')
  
      /*
       * ENTRY CONFIG
       *
       * Add 1 entry for each "page" of your app
       * (including one that's included on every page - e.g. "app")
       *
       * Each entry will result in one JavaScript file (e.g. app.js)
       * and one CSS file (e.g. app.css) if you JavaScript imports CSS.
       */
      .addEntry('app', './web/assets/js/app.js')
  
      // will require an extra script tag for runtime.js
      // but, you probably want this, unless you're building a single-page app
      .enableSingleRuntimeChunk()
  
      .cleanupOutputBeforeBuild()
  
      .enableSourceMaps(!Encore.isProduction())
  
      // enables hashed filenames (e.g. app.abc123.css)
      .enableVersioning(Encore.isProduction())
  
      // uncomment if you use Sass/SCSS files
      .enableSassLoader()
  
      // uncomment if you're having problems with a jQuery plugin
      .autoProvidejQuery()
  ;
  
  module.exports = Encore.getWebpackConfig();
  </code></pre>