I have some markup in my Index.cshtml view, which has an inline css style with the
background-image
property. When the page is rendered the correct path of the image is not being generated and the tilde remains in the url
HTML Markup:
The path that is used on the img
tag works properly when the page is rendered, but the path in the background-image
property displays like this and the image is not found
<article class="card-item card-item-colored" style="background-image:url(~/build/images/11.jpg);">
<img class="card-item-pic" src="/build/images/11.jpg" alt="">
<div class="card-item-hover">
<a href="#" class="btn btn-inverse-colored">View Demo</a>
</div>
<header class="card-item-caption">
<h4>Login Page</h4>
</header>
</article>