I've been working on some code that should dynamically add one part of a path to another part of a path. However, Vue seems to think that the :src path is a string instead of a path.
Here's the code:
<img:src="'@/assets/images/' + this.params.img" >
The this.params.img
is basically what adds the second part from inside the modal I created:
this.$modal.show('modal-newreminder', {
title: this.$i18n.t('firstReminderTitle'),
text: this.$i18n.t('firstReminderText'),
img: 'onboarding/onboarding-2.svg'
});
Chrome's inspect element screenshot:
[]
I've tried doing this as well:
<img :src=" require(`@/assets/images/${this.params.img}`) " />
But no luck so far
Thanks!