In this article, we will discuss how to deploy custom images in SharePoint 2010. Also, you can check out my previous posts on:
In SharePoint 2010, it is easy to deploy .ascx controls, .css files, .js files, custom images etc. By default SharePoint 2010 stores images to layouts directory inside Images folder which is located in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES. But it is always better to put images inside a subfolder. You can access the images by _layouts/images/image1.jpg or if you have a subfolder then it can be accessible by _layouts/images/subfolder name/image1.jpg.
In Visual Studio 2010 it is easy to deploy custom images. To deploy custom image Right click on the project -> Add -> SharePoint Images Mapped Folder.
Once you will do this it will create a folder namely Images in the project. And if you will put the image inside the folder it will automatically deploy to the SharePoint’s Image folder.
To organize the images in a better way Visual Studio automatically creates a subfolder namely with the current project name. So that while deployment it creates a subfolder inside the SharePoint Images folder.
Similarly to get the benefit of Visual Studio 2010, you can choose different SharePoint mapped folders by Right click on the project then Add -> SharePoint Mapped Folder… It will open a pop-up window that contains different mapped folders like Bin, Config, Logs, Control Templates, Features etc. It basically shows the list of folders available under the SharePoint14_Root path.
SharePoint Online FREE Training
JOIN a FREE SharePoint Video Course (3 Part Video Series)