title: Specify destination folder in url-loader for webpack
body: <p>I have images path in css like url(images/image1.jpg) and the loader is defined as </p>
  
  <pre><code>{ test: /\.(png|woff|woff2|eot|ttf|svg|jpg)$/, loader: 'url-loader?limit=1&amp;name=images/[name].[ext]' },
  </code></pre>
  
  <p>The issue I am facing is that after build process the images are copied to respective folder but the path is pointing to images/image1.jpg relative to the css file location. I want it to be relative to the root directory.</p>
  
  <p>I tried adding a leading / in the name query parameter and it partially fixed the issue</p>
  
  <pre><code>{ test: /\.(png|woff|woff2|eot|ttf|svg|jpg)$/, loader: 'url-loader?limit=1&amp;name=images/[name].[ext]' },
  </code></pre>
  
  <p>but when I move my files into a sub folder it still points to the root of the domain instead of the folder.</p>
  
  <p>Can you tell me what I am missing in the configuration?</p>
  
  <p>Here is the webpack configuration</p>
  
  <pre><code>'use strict';
  
  var webpack = require('webpack'),
    HtmlWebpackPlugin = require('html-webpack-plugin'),
    OpenBrowserPlugin = require('open-browser-webpack-plugin'),
    ExtractTextPlugin = require('extract-text-webpack-plugin'),
    path = require('path'),
    srcPath = path.join(__dirname, 'src'),
    jsDestPath = 'scripts/';
  
  module.exports = {
    target: 'web',
    cache: true,
    entry: {
      common: ['react', 'react-router', 'alt', 'es6-promise'],
      offline: path.join(srcPath, 'libs/offline.min.js'),
      materialize: path.join(srcPath, 'libs/materialize.js'),
      css3_animate_it: path.join(srcPath, 'libs/css3-animate-it.js'),
      app: path.join(srcPath, 'App.js')
    },
    resolve: {
      root: srcPath,
      extensions: ['', '.js'],
      modulesDirectories: ['node_modules']
    },
    output: {
      path: path.join(__dirname, 'build'),
      publicPath: '',
      filename: jsDestPath + '[name].js',
      library: ['Example', '[name]'],
      pathInfo: true
    },
  
    module: {
      loaders: [
        {
          test: /\.js?$/,
          exclude: /node_modules/,
          loader: 'babel?cacheDirectory'
        },
        {
          test: /\.css$/,
          loader: ExtractTextPlugin.extract("style-loader", "css-loader")
        },
        /*{
          test: /\.(png|woff|woff2|eot|ttf|svg|jpg)$/,
          loader: 'url-loader?limit=5' // inline base64 URLs for &lt;=8k images, direct URLs for the rest
        },*/
        { test: /\.(png|woff|woff2|eot|ttf|svg|jpg)$/, loader: 'url-loader?limit=1&amp;name=images/[name].[ext]' },
        {
          test: /\.rt/,
          loader: "react-templates-loader"
        }
      ],
  
    },
    plugins: [
      new webpack.ProvidePlugin({
        $: "jquery",
        jQuery: "jquery",
        "window.jQuery": "jquery"
      }),
      new webpack.optimize.CommonsChunkPlugin('common', jsDestPath + 'common.js'),
      new webpack.optimize.UglifyJsPlugin({minimize: true}),
      new HtmlWebpackPlugin({
        inject: true,
        template: 'src/index.html'
      }),
      new OpenBrowserPlugin({
        url: 'http://localhost:8080',
        browser: 'Chrome'
      }),
      new webpack.NoErrorsPlugin(),
      new ExtractTextPlugin("styles/style.css", {
        allChunks: true
      })
    ],
  
    debug: true,
    //devtool: 'eval-source-map',//'eval-cheap-module-source-map',
    devServer: {
      contentBase: './build',
      historyApiFallback: true
    }
  };
  </code></pre>