underscore-template-loader load svg but jpeg/png

I want to load SVG inline in my underscore templates but not jpeg/png files.
For now, I know that passing [] in attributes property will not proceed any files included through src.

How i can differentiate files in underscore-template-loader by type?

My loaders:

module: {
rules: [
  {
    test: /.js$/,
    loader: "babel-loader",
    exclude: /node_modules/
  },{
    test: /.scss$/,
    loaders: ["style-loader","css-loader?url=false,sourceMap=true","sass-loader?sourceMap=true"]
  },{
    test: /.css$/,
    loader: "style-loader!url=false"
  },{
    test: /.tpl$/,
    loader: "underscore-template-loader",
    query: {
      withImports: true,
      attributes: ['s-img:src']
    }
  },{
    test: /.(png|jpg)$/,
    loader: 'ignore-loader'
  },{
    test: /.svg/,
    loader: 'svg-loader'
  }  
]
}


Source: stackoverflow-javascript