Images rendered with variables are missing in Vue3
flaneuse opened this issue · 2 comments
flaneuse commented
Images which are rendered dynamically in loops have incorrect sources:
e.g. :src="
src/assets/team/${person.img}"
leads to a broken link.
Switching to /src/assets
does not fix the problem.
@
syntax, which is supported by Vite, does not seem to work within variables.
Images work fine locally but are broken on the prod deploy.
flaneuse commented
Components affected:
Resources.vue --> resources/search
ResourceDescription --> resources/{id}
Press.vue --> /press
SituationReports.vue --> situation-reports
About.Vue --> /about
SourceDescription.vue --> /sources
leandrocollares commented
Fixed!