Why do my markdown images show in VS22 markdown preview but not when the app is running?

Joe Brown 0 Reputation points
2023-03-01T13:38:28.4033333+00:00

I am making an article/blog style website on Blazor Server.

I have an Article Razorpage which using parameters will go and retrieve the correct markdown file. When viewing the markdown file, the images show fine in the preview panel, however when I bring the markdown file to my Razor page and display it, the images do not show.

This is the img tag I used:

<img src="Images/Cheese_Pallets.jpg" alt="Pallets of Cheese" style="height:70%; width:70%"/>

Developer technologies | .NET | Blazor
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.