Skip to content
Advertisement

How to display images from an array in vuepress or vuejs?

I have an array which looks like below:

JavaScript

but when I try to print using the below code

JavaScript

Only the questions are generated correctly but the images are not displayed properly, only the location gets printed as below and is highlighted in blue. Please help.

Image not displayed only address

Advertisement

Answer

I didn’t use the function call. I directly used require keyword in the img tag itself and it worked.

JavaScript

@Nikola Pavicevic – Thanks for helping me think in this direction!

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement