I have a Blazor Component library with components and stylesheets. Now I want to add an image file (static asset) to the library, and reference it from a server-side Blazor app (via NuGet).
I can already do this with the stylesheet, using a link tag in _Host.cshtml:
<link href="_content/BlazorNugetName/css/styles.css" rel="stylesheet" />
This includes the css asset in my consuming app.
If I use an image tag in my app like this:
<img src="/_content/BlazorNugetName/images/logo.png" />
or like this:
<img src="_content/BlazorNugetName/images/logo.png" />
It works when I reference the Blazor library directly. But with NuGet, I get a 404.
I probably need a link tag for this in _Host.cshtml as well. But what should it be?
The docs only use scripts and stylesheets in their examples, not image files.
I have looked at the documentation for the html link tag, but could not find any relevant syntax.
As an experiment, I tried:
<link href="_content/BlazorNugetName/images/logo.png" rel="prerender" />
but it made no difference.