Browse Source

Fix svg mime-type

Browsers don't display svg from data-uri if the mimetype is `application/svg+xml` (testing with \<img> tag in Firefox and Chrome). However, `image/svg+xml` works.
v6-dev
Eiríkur Heiðar Nilsson 8 years ago
committed by GitHub
parent
commit
e53b3a30de
  1. 2
      packages/neutrino-middleware-image-loader/index.js

2
packages/neutrino-middleware-image-loader/index.js

@ -9,7 +9,7 @@ module.exports = ({ config }, options) => {
.test(/\.svg(\?v=\d+\.\d+\.\d+)?$/)
.use('url')
.loader(urlLoader)
.options({ limit, mimetype: 'application/svg+xml' });
.options({ limit, mimetype: 'image/svg+xml' });
config.module
.rule('img')

Loading…
Cancel
Save