I have an image in my public folder (public/images/image.png) which is inside of a Vuetify v-img tag inside of a component (components/component.vue), with src="images/image.png". This works fine when displaying a page that is not nested in a folder, for example "pages/index.vue", but when I try display the same component in nested page "pages/something/index.vue" the component loads but not the image.
Asked
Active
Viewed 566 times
0
-
Use either absolute paths or aliases rather than relatives paths. – kissu Dec 28 '22 at 22:24
1 Answers
-1
Does adding a slash as suggested in this answer solve it?
Change src="images/image.png"
to src="/images/image.png"

Felix Eklöf
- 3,253
- 2
- 10
- 27