title: How to use file-loader with webpack
body: <p>I am getting the error.</p>
  <pre><code>ERROR in ./src/images/whitepark-bay.jpg 1:0
  Module parse failed: Unexpected character '�' (1:0)
  You may need an appropriate loader to handle this file type
  </code></pre>
  <p>Here is the loader installed OK.</p>
  <pre><code>richgk@DESKTOP-54JFAJP:~/projects/antrim-walks$ npm install file-loader --save-dev
  npm WARN antrim-walks@1.0.0 No description
  npm WARN antrim-walks@1.0.0 No repository field.
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {&quot;os&quot;:&quot;darwin&quot;,&quot;arch&quot;:&quot;any&quot;} (current: {&quot;os&quot;:&quot;linux&quot;,&quot;arch&quot;:&quot;x64&quot;})
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {&quot;os&quot;:&quot;darwin&quot;,&quot;arch&quot;:&quot;any&quot;} (current: {&quot;os&quot;:&quot;linux&quot;,&quot;arch&quot;:&quot;x64&quot;})
  
  + file-loader@6.0.0
  added 4 packages from 6 contributors and audited 420 packages in 6.973s
  </code></pre>
  <p>Also the webpack.config.js</p>
  <pre><code>const path = require('path');
  module.exports = {
      module: {
          rules: [
            {
  
              test: /\.css$/,
              use: [
                'style-loader',
                'css-loader'
              ],
  
              test: /\.(png|gif|jpg)$/i,
              use: [
                {
                  loader: 'file-loader',
                },
              ],
  
            },
          ]
      },
      entry: './src/index.js',
      output: {
          filename: 'main.js',
          path: path.resolve(__dirname, 'dist'),
      },
      mode: 'development',
  };
  </code></pre>
  <p>I'm not sure what I've done wrong, it all looks the same as another project where I used file-loader (also tried url-loader) with no issues.</p>
  <p>Thanks.</p>