Two solution for you:
1,call staticfile middleware as below in Program.cs:
app.UseStaticFiles(); //Serve files from wwwroot
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(
Path.Combine(builder.Environment.ContentRootPath, "images")),
RequestPath = "/images"
});//Serve files from images
Result:
2,move your images
folder into wwwroot
You could read this document to learn more about asp.net core staticfiles
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Ruikai Feng