Hi @MIPAKTEH_1,
According to your description, you could generate the image element by using foreach and create a model class inside the component to show the image folder's name.
More details, you could refer to below sample:
@page "/"
<PageTitle>Home</PageTitle>
<h1>Hello, world!</h1>
Welcome to your new app.
@* Use a foreach loop to render each image *@
@foreach (var image in images)
{
<img src=@($"/Images/{image}") asp-append-version="true" width="100px" style="display:block; margin-bottom:10px;" />
}
@code {
// Define the list of image file names
private readonly List<string> images = new()
{
"house_.png",
"house_1.png",
"house_2.png"
};
}
Result:
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.