How to modify the attachment icon used to represent various file types



The ServiceNow platform has a wide variety of icons that are displayed beside an attachment type on various records to be an indicator of the file type that the attachment represents.  In most cases the out-of-box defaults should be sufficient and acceptable for representing these attachment types.  However, in certain cases a different icon for a custom file type may be needed, or it may be necessary to change the icon as currently configured for a known file type.  This article shows the steps that can be used to accomplish this.


The first procedure we will describe is that of modifying the icon for a specific attachment to be another icon type image as already stored on the instance.  To determine the images that are already found on the instance, type in the Filter navigator text field and press the Enter key.

This will display the Image Picker utility.  In the Image directory pull down field at the top of the image picker form, select the option labeled icons.

 Image Picker Form

Note that any image type (not just those in the icons image directory) can be selected for the image to associate to an attachment type, however for performance, size and spacing issues, it is best to select an image in the icons filter, which are generally smaller in size and fast to load.

Review the images and locate the image you would prefer to use for your attachment type.  If you cannot find an image that is applicable to the file attachment type you will be adding, you can also import a custom image onto the instance (see KB Article KB0723605 for instructions on how to do this).

Once you locate the image type you prefer to associate to the file type, hover the mouse over that image in the Image Picker for a few moments.  A pop-up tool-tip message should appear which shows the name of that icon image file.  Make note of this file name, including the path information.  For the example shown, the full path and file name would be images/icons/location.gif.

Image icon file selected

On the same instance, browse to the following location using the Menu Navigator: System UI -> Attachment Icon Rules.

A list of Attachment Icon records will then appear in a list.  Locate the record in the list corresponding to the attachment type or file extension you want to change.  Note that the icon to associate to a specific attachment file type can be configured as per the file extension of the attachment or the mime type as detected by the system.  If a particular attachment type has a record for both it's mime type and the file extension, the mime type record will take precedence.

Once you have located the correct record, open that record for editing.

In the Icon field type the full path and file name noted in the steps above.  This should be the exact text as displayed in the pop-up including the case of the characters in that path and name.

Changing the icon for a specific  attachment type

After modifying the data in the Icon field as necessary, click the Update button on the Attachment Icon Rule record.

This new icon will then be used to represent the specified attachment type on various records on that instance.

New icon configured for .docx file extension 

Additional Information

As noted above, if a new or custom file type or custom icon is to be used, the steps for performing those procedures are described in KB Article KB0723605 - How to Create a Custom icon for use in representing a specific attachment file type.