I am new to SharePoint, and want to discuss an issue.

I created a .ascx user control and put it on a site page "SomePage.aspx". I have a html table structure in my .ascx Control where i am showing different information. In one of the table column, I want to show an image. Now, my question is, where i store this image so that i can use it in my Control on site page ?? Can anybody tell me the complete path or url of folder to store images ??

Also the path for accessing that image ??


You can put the images in the LAYOUTS folder in the 14 hive. (Should be at "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS")

To access the images then, you can use the SharePoint mapped /_layouts/ folder.

For instance, if you put MyPic.jpg in ...\LAYOUTS\MySolutionName\MyPic.jpg you can access that image from any location within your farm at /_layouts/MySolutionName/MyPic.jpg.

| improve this answer | |
  • I Think the correct path for storing images will be: (Should be at "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES") Am i correct ?? – SPBeginer Nov 20 '12 at 15:41
  • It depends entirely on how you want to package your solution. You can put them in the images mapped folder in VS, then the URL is /_layouts/images/... See sharepoint.stackexchange.com/questions/39707/… – RJ Cuthbertson Nov 20 '12 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.