How to change File field icons (without changing core)? The generated markup for displaying a file field is (PDF in this example):

&lt;img src="/modules/file/icons/application-pdf.png" title="application/pdf" alt="" class="file-icon"&gt;


I'd like to use a different icon image. How could I do this without changing the content of /modules/file/icons?

I guess I could hide the default image and display a different one with CSS, but seems a bit messy.
You can override theme_file_icon in your theme, and specify different icon images. See file_icon_path for reference regarding how core determines which icons to use.

You can also set the "file_icon_directory" variable to the path to your icons, as the file_icon_path function looks for the path in that variable.