Missing icons for specific media types


Description

When there is no icon associated with a file extension in the operating system for PDF, DOCX or other file types, Sitecore shows an empty icon for the corresponding media items in the content tree.

Solution

  1. Define the icons you would like to use for specific media types and place them under the website root.
  2. Add or modify the appropriate section for these media types in the web.config or /App_Config/Sitecore.config file (depending on your Sitecore version).
    For example for PDF:
    <mediaType name="PDF file" extensions="pdf">
      <mimeType>application/pdf</mimeType>
      <forceDownload>false</forceDownload>
      <sharedTemplate>system/media/unversioned/pdf</sharedTemplate>
      <versionedTemplate>system/media/versioned/pdf</versionedTemplate>
      <thumbnails>
        <staticFile>Path where the icon is located. For example /sitecore/shell/Themes/standard/images/pdf_icon.png</staticFile>
      </thumbnails>

    </mediaType>
  3. Clear the media cache for the shell site by deleting the \App_Data\MediaCache\shell folder.
  4. Clear the browser cache.