How to Add Custom File Type Icons in SharePoint?
Problem: Photoshop files uploaded to the corporate branding portal was giving “JPEG” image icon and often caused confusion to end users!
Root cause: This is because of the DOCICON.XML file mapping in SharePoint. Out of the box, SharePoint 2010 has a icon for Photoshop files similar to JPEG Files.
Fix: We’ve to change the icon type in SharePoint 2010. Upload new icon for Adobe Photoshop files in 14 hive, update the DOCICON.XML file, and do an IISReset!
Steps in detail: How to Add Custom File Type Icons in SharePoint?
- Grab the Photoshop document icon (of name: psd.png) of 16×16 from the Internet. Copy to: 14 hive’s Images folder: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES
- Take a backup and Update the DOCICON.XML, PSD Mapping key: with <Mapping Key=”psd” Value=”psd.png”/> under ” <ByExtension>” Node
- Run IISReset from Command line console.
Before Adding PSD Icon:
After adding PSD Icons:
Same issue occurred in an another case with Auto-CAD Files. Performed the above steps with Auto-cad Icon and fixed the issue by adding icon to SharePoint with new mapping key: <Mapping Key=”dwg” Value=”autocad.png”/>
Don’t forget to do IISReset! Here is the before
and after screen shots: SharePoint custom icon for Autocad files
Adding File Type Icons To SharePoint 2013
For SharePoint 2013, in addition to all the above steps, repeat it for “15” hive also! Meaning update DocIcon.xml file at “C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\XML” and place new file type icon to “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\template\images”.
Here is my old post on changing PDF Icon in SharePoint 2007: Change PDF Icon in SharePoint
3 thoughts on “How to Add Custom File Type Icons in SharePoint?”
Thanks this is great! I was just wondering what happens during occasional SharePoint updates? Do the DOCICON.XML file get overwritten? What about if we change the Icons (say for office 2003 which we are trying to phase out)?
In my experience, I haven’t seen any such incidents. But there are chances. So, Its a better idea to build a solution -WSP – or have a script – for these kind of changes!
Excellent Post. Thanks a Ton