Working on styling some cards within an MVC project, I have a custom property in my CSS file called "--bg-img" which is defined as follows:
background-image: linear-gradient(rgba(0, 0, 0, var(--bg-filter-opacity)), rgba(0, 0, 0, var(--bg-filter-opacity))), var(--bg-img);
In my cshtml file, the code appears like this:
<a class="card-posting-link posting-links" asp-action="details" asp-route-id="@item.Id" style="--bg-img: url('../../wwwroot/Uploads/@item.ImagePath')">
Everything works fine in VS Code, for example:
<a class="card-posting-link posting-links" href="/#/" style="--bg-img: url(/Assets/image.jpeg)">
I have tried using:
~/Uploads
~/wwwroot/Uploads
and various other methods to retrieve the images, but nothing seems to be working.