Static GitHub Issues

[2123] Using CSS inlined style to import images

prev: Authorization between nuxtjs and the backend API
next: Publish a new release candidate

I have searched throughout the issues in Nuxt and Next and found no solution to importing images directly in the vue <template>.

Here is what I am trying to do:

<template lang="html">
    <div class="background" :style="{ backgroundImage: `url(${backgroundUrl})` }">
</template>

Basically this component needs to accept a prop of backgroundUrl and needs to be inline styled so that I can use this component on different pages with different backgrounds.

Thoughts?

EDIT: One way that I can think of is add the images into the static folder and call the directly, but I'm not sure that's the best way to approach this since I want all my images to be in one folder assets/images.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1883">#c1883</a>)</em></sub></div>