Webpack - url-loader cannot resolve jpg
<p>I have two folders in root directory of project - build and src. I would like to move images from src folder to build folder. However i'm getting error "Cannot resolve 'file'" despite i've included the url-loader plugin.</p>

<p><strong>header.jsx</strong></p>

<pre><code>import {React, ReactDOM} from '../../build/react';

export default class Header extends React.Component {

  render() {
    return (
        &lt;div className="header"&gt;
        &lt;img className="logo" src={require("../src/content/images/program-brand-logo.jpg")} /&gt;
        &lt;/div&gt;
      );
    }
  };
</code></pre>

<p><strong>Error log:</strong></p>

<pre><code>ERROR in ./src/components/header.jsx
Module not found: Error: Cannot resolve 'file' or 'directory' ../src/content/images/program-brand-logo.jpg in /Users/username/Desktop/Projects/Demo/Scorecard/SPA/React (Working Copy)/src/components
 @ ./src/components/header.jsx 45:68-123
</code></pre>

<p><strong>Webpack.config.js</strong></p>

<pre><code>var webpack = require('webpack');
var path = require('path');
require("babel-polyfill");

var BUILD_DIR = path.resolve(__dirname, 'build');
var APP_DIR = path.resolve(__dirname, 'src');

module.exports = {
  entry: [
    // Set up an ES6-ish environment
    'babel-polyfill',
    'bootstrap-loader',
    'webpack/hot/dev-server',
    APP_DIR + '/import.js',
  ],
  output: {
    path: BUILD_DIR,
    filename: 'bundle.js'
  },
  module: {
    loaders: [{
      test: /\.jsx?$/,
      loader: 'babel',

      exclude: /node_modules/,
      query: {
        plugins: ['transform-runtime'],
        presets: ['es2015', 'stage-0', 'react']
      }
    }, {
      test: /\.css$/,
      loader: "style-loader!css-loader"
    }, {
      test: /\.scss$/,
      loaders: ["style", "css", "sass"]
    }, {
      test: /\.(png|woff|woff2|eot|ttf|svg|jpg|gif)$/,
      loader: 'url-loader?limit=100000'
    }]
  },
  plugins: [
    new webpack.ProvidePlugin({
      $: "jquery",
      jQuery: "jquery"
    }),
    new webpack.HotModuleReplacementPlugin()
  ]
};
</code></pre>