Answer the question
In order to leave comments, you need to log in
Why doesn't nuxt.js find the image in the same path?
With this code everything works fine:
<img src="~/assets/img/recipes_lvl1.png" alt="Нет фото">
<img :src="String(recipe.image)" alt="Нет фото">
{ statusCode: 404,
path: '/recipes/~/assets/img/recipes_lvl1.png',
message: 'This page could not be found' }
Answer the question
In order to leave comments, you need to log in
I have no idea why nuxt puts the wrong path. But I solved the problem by moving the img folder from assets to the static folder and changing the path to the image to "img/recipes_lvl1.png"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question