Occasionally, there may be a need to show additional file icons for different file types in SharePoint as different business areas work with different types of content. In this scenario, we will add a specific icon for Adobe Photoshop files (.psd).
Out of the box, SharePoint 2010 has a generic icon to display for Photoshop files in our example farm:
To add a more specific icon, we only need to do a couple of steps:
First, find an icon that represents the document type. The icon should be in a web-ready format (png, gif, jpg), and sized to approximately 16x16 pixels. In this example, we will use a png file:
Then, copy the file to the following directory to one of your front-end web servers. The following steps will need to be done on each front-end server. The file should be copied to the <14Hive>\TEMPLATE\IMAGES\ directory. In our example farm, using a default install location, the directory is:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES\
Next, open the docIcon.xml file located in the 14Hive under TEMPLATE\XML. Again, in our example farm, the location is:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML\
Find the <ByExtension> element, and add the following line inside of it:
<Mapping Key="psd" Value="psd-small.png"/>If you already have an existing entry, just modify the value attribute to match the new icon.
Finally, perform an IISReset to have SharePoint pick up the changes. We now see the new icon in place