In @vue/cli 4.0.5 app I set some app settings in app.settings.js file, including task image:
export const settingsTaskImg = '/images/task.jpg'
which would be used in many parts on the app.
But the problem is that when I try to use this setting value in my component it fails, like :
<template>
<div class="page_content_container item_container">
taskImg:{{ taskImg }}
<img alt="Vue logo" src="../../assets/images/task.jpg">
/* the image above is rendered ok */
/* the image above is NOT rendered */
<img class="pull-left m-3 single_hostel_image_left_aligned" :src="'../../assets'+taskImg" alt="Task Image"/>
in the console of my browser I see : https://i.stack.imgur.com/Gbfzc.jpg image with path using settings value is not rendered.
Which is valid way ?
Updated # 2 : In my prinrscreen I see that valid image has path like
/img/task.0e7d942e.jpg
I do not have any /img/ in my app, it looks like some temporary dir and image I try to bind is not rendered in this subdirectory... Have I to call some vuejs method to render it to this path ?
Thanks!