jeudi 30 avril 2020

How to write paths for assets in Laravel+vue project to component with language option?

I have pure laravel structure and my image is under:

project/resources/assets/dist/img/en/image-en.png
project/resources/assets/dist/img/fr/image-fr.png

I want to show images from my vue component in:

project/resources/assets/js/components/Templates/partials/component.vue

What are best option to handle show images in that component? My current solution is:

<template>
<img src="../../../../dist/img//image-.png">
</template>
export default {
name:'example'
  data: {
    lang: 'en'
  }
}

How to remove ../../../../ usage from path? and reuse image path in Vue component.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2zHZ1Qx
via IFTTT

Aucun commentaire:

Enregistrer un commentaire