Why can't I see my image in my Image container from .NET solution?

28 views Asked by At

I have an images folder in which I have stored an image. I can see it in my file explorer, but in my .NET solution, I can only see the images folder. I can't see the image which is inside that folder.

enter image description here

Help me out in this as I am using ASP.NET web forms.

1

There are 1 answers

0
Hornwood509 On BEST ANSWER

In order to see the files inside of the solution or project, you have to add them. Simply creating a folder and copying files into it will not suffice.

In Solution Explorer, Right-Click on the images folder> Add> Existing Item... Browse for the files you want to include, and then click on 'Add'

enter image description here

On a side note, when adding images to your project, it is a good idea to optimize them. I've included a link below to the Visual Studio Marketplace where you can find the Image optimizer from Madz Kristensen, which can help you reduce the file size, without losing noticeable quality.

Mads Kristensen - Image Optimizer