But this no longer works. The only way to load .svg files as regular images is to import them, then add them in a computed property/data, and then use that in a :src attribute. This takes a lot more lines of code and even seems to perform a little slower. Another big downside is that if I install the library in a huge project that uses a lot of SVG images, it will break them all. And is there even a way to load the files dynamically? (e.g.: my-image-{myReactiveProperty}.svg).
So I'm either forced to change all my SVG images into vue-svg-loader components, or set up the import method which will take pretty much the same effort. Either way using the library inevitably breaks the current code with regular syntax.
I'm using Nuxt 2 with Vuetify, and the exact same config as in the FAQ:
I have the library set up to work with both inline and external SVGs.
Before installing it, I could load SVG images in my HTML like this:
But this no longer works. The only way to load .svg files as regular images is to import them, then add them in a computed property/data, and then use that in a
:src
attribute. This takes a lot more lines of code and even seems to perform a little slower. Another big downside is that if I install the library in a huge project that uses a lot of SVG images, it will break them all. And is there even a way to load the files dynamically? (e.g.:my-image-{myReactiveProperty}.svg
).So I'm either forced to change all my SVG images into vue-svg-loader components, or set up the import method which will take pretty much the same effort. Either way using the library inevitably breaks the current code with regular syntax.
I'm using Nuxt 2 with Vuetify, and the exact same config as in the FAQ: