In this article we will discuss about 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 locates in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES. But it is always better to put images inside a sub folder. You can access the images by _layouts/images/image1.jpg or if you have a sub folder then it can be accessible by _layouts/images/sub folder 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 image inside the folder it will automatically deployed to the SharePoint's Image folder.
To organize the images in a better way Visual Studio automatically creates a sub folder namely with the current project name. So that while deployment it creates a sub folder inside the SharePoint Images folder.
Similarly to get 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 content different mapped folders like Bin, Config, Logs, Control Templates, Features etc. It's basically shows list of folders available under the SharePoint14_Root path.