Level 63
You should try like this.
https://blog.logrocket.com/using-svg-and-vue-js-a-complete-guide/
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Laravel/VueJs (composition API) successfully shows PNG Images, throws 404 on svg.
I checked the permissions ( the both have 777), I checked the path I am 200% it's the correct path, but when I try to show a svg image I get 404, on png/jpg/jpeg works fine.
THIS DOESN'T WORK (svg)
<img
class="selected-vehicle"
:src="iconUrl"
/>
const basePath = ref(window.location.origin);
const iconUrl = ref(basePath.value + '/panel/assets/images/container.svg')
THIS WORKS (png image)
<img
class="selected-vehicle"
:src="iconUrl"
/>
const basePath = ref(window.location.origin);
const iconUrl = ref(basePath.value + '/panel/assets/images/test.png')
Please or to participate in this conversation.