Custom File Type Icons

WP-Filebase uses WordPress’ default file type icons in wp-includes/images/crystal for files without a thumbnail. To use custom icons copy the icon files in PNG format named like pdf.png or audio.png to wp-content/images/fileicons (you have to create that folder first).

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

6 thoughts on “Custom File Type Icons

  1. VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    Hi,

    Could you elaborate on the icons?? Which .png named files can I add? Is this for the filetree view, or how is the naming for those?

    Thanks,
    Francisco

  2. Fabian says:
    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    Hi,

    The custom icons are used for filetree and %file_icon_url% and %file_small_icon% in templates if no thumbnail has been uploaded or generated. Icons should be at least 32px in height.

  3. Wes says:
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    I created the directory (wp-content/images/fileicons) and added a file called pdf.png, but it doesn’t work. I still see the default document icon.

  4. Wes says:
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    Update: putting files like pdf.png and docx.png in the “crystal” directory works.

  5. Daniel says:
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    Ciao Fabian.

    Creating a directory at wp-content/images/fileicons only adds a new default icon set across Filebase; it does not allow for targetting a specific theme.

    Without rewriting your code in item.php…

    $img_path = ABSPATH . WPINC . ‘/images/’;
    $img_url = site_url(‘/’ . WPINC . ‘/images/’);
    $custom_folder = ‘/images/fileicons/’;

    … is there a method for controlling the icon set for a multi-site installation to target a specific theme, e.g., wp-content/themes/MY_THEME/images/fileicons/?

    Thanks for your input.

    — Daniel

  6. raj yadav says:
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    That is like a great most https://texttwist.online important page to be generate.

Leave a Reply

Your email address will not be published.