Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Kris01's avatar
Level 3

Laravel/VueJs (composition API) successfully shows PNG Images, throws 404 on svg

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')
0 likes
1 reply

Please or to participate in this conversation.