SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a Custom webpart and would like to show icons for the extensions. This is on a Sharepoint Designer 2010. Also if i have extensions like .wav how can i show or add a custome icon. Thanks in advance

share|improve this question
up vote 4 down vote accepted

You can change File association icons globally by following steps described here:

Changing File Associations Icons in SharePoint 2010

Basic steps are:

  1. Upload icon file to SP (\14\TEMPLATE\IMAGES)
  2. Locate DocIcon.xml (\14\TEMPLATE\XML)
  3. Add <Mapping Key=”[YOUR EXTENSION]” Value=”[ICON FILE]”/> (eg. <Mapping Key=”pdf” Value=”icpdf.gif”/>)
  4. Make iisreset
share|improve this answer

If it's custom code then you can use SPUtility.MapToIcon to get the name of the icon in "/_layouts/images/"

If it's a view then just add the column DocIcon

For adding new images see the answer by @Vedran

share|improve this answer
Thanks guys I was after showing the icons in a custom webpart. Using the ddwrt funstion worked. – naijacoder Apr 12 '12 at 6:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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