S
S
skuvaWeb2019-01-04 10:35:18
JavaScript
skuvaWeb, 2019-01-04 10:35:18

Pictures and vue.js?

Please explain how to properly integrate pictures when creating a SPA, for example on vue?
Let's say an array of posts comes from the server, the element should have a field with the image path. Then, along this path, we include these images in the webpack via require and work with them as modules?
I don’t quite understand how to connect backend and front at this moment)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem, 2019-01-04
@skuvaWeb

<img :src="item.photo" />
Require is not needed. Work with the image address as with a normal string.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question