Check out example codes for "html non importa immagini in webpack". It will help you in understanding the concepts better.

Code Example 1

{
    test: /\.(png|jpe?g|gif)$/i,
    loader: 'file-loader',
    options: {
        name: '[name].[ext]',
    },
}

Learn ReactJs, React Native from akashmittal.com