shrpne / vue-inline-svg

Dynamically loads an SVG source and inline <svg> element so you can manipulate the style of it
MIT License
175 stars 21 forks source link

Some .svg files not showing properly #22

Closed saint777 closed 3 years ago

saint777 commented 3 years ago

Hello @shrpne some .svg files not loading properly, e.g. this svg only shows arrow, with <img src> it works ok (shadows, backgrounds, borders etc)

Expected: https://i.imgur.com/26X33mD.png Got this: https://i.imgur.com/AKgdKZS.png

plugin version: 2.0.0

looks like filters doesn't apply properly

`

`

shrpne commented 3 years ago

It works fine for me https://codesandbox.io/s/fragrant-currying-jn4lh?file=/src/App.vue

What browser do you use?

saint777 commented 3 years ago

It works fine for me https://codesandbox.io/s/fragrant-currying-jn4lh?file=/src/App.vue

What browser do you use?

i'm using Chrome 85

and i'm actually using Nuxt.js i had to use require InlineSvg(:src="require('~/assets/img/landing/scroll-to-top.svg')") -> no errors but incorrect svg render

without require InlineSvg(src="~/assets/img/landing/scroll-to-top.svg") -> vue-inline-svg.js?6d5e:178 GET http://localhost:3040/~/assets/img/landing/scroll-to-top.svg 404 (Not Found)

saint777 commented 3 years ago

i found problem

i had several svgs with same filter ID's

shrpne commented 3 years ago

We have similar issue about unique ids #21, so I close it as duplicate for now