Static GitHub Issues

[956] Assets path resolution not working for tags different than <img>

prev: Changing ScrollToTop behavior stoped working.
next: Integration with Meteor

I created a new Nuxt project and put files named campus.jpg and campus.mp4 inside the assets folder. Then in my index.vue I just wrote:

<template>
  <div>
    <video autoplay muted loop poster="~assets/campus.jpg">
      <source src="~assets/campus.webm" type="video/webm">
      <source src="~assets/campus.mp4" type="video/mp4">
    </video>
  </div>
</template>

The generated code stays with the same path (i.e. http://localhost:3000/~assets/campus.jpg), so just 404 happens. The same path with <img src="~assets/campus.jpg"> works as expected.

<!--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/c819">#c819</a>)</em></sub></div>