Issue with uploading custom favicon “.ico” in Magento 2.x

Magento 2 supports the following file types for favicon: .ico, .png, .gif, .jpg, .jpeg, .apng, .svg. Not all browsers support all these formats. The most widely supported file format to use for a favicon is .ico. While trying to upload a .ico or .apng format file, an error message appears “we don’t recognize or support this file extension type“.

First, don’t touch Magento core files, as the issue is related to the core file(\vendor\magento\module-theme\view\adminhtml\ui_component\design_config_form.xml). So to resolve the issue you can either add custom favicon manually from your theme or can use our module with a bug-fix.

Add custom favicon manually :

To override the default 16x16px favicon manually, add your custom favicon.ico in <your_theme>/Magento_Theme/web/ directory.

To add favicon of other sizes, take the following steps:

1. Add your icons in the <your_theme>/Magento_Theme/web/ directory.
2. Create a layout file “default_head_blocks.xml” in <your_theme>/Magento_Theme/layout/ and specify the paths to the icons with their sizes.

For example, if you added a favicon-32×32.ico icon and want it to be used as a 32x32px favicon, your default_head_blocks.xml would be like following:

For your changes to be applied, clear the browser cache, and the following directories on the server (do not delete the .htaccess file!):

– pub/static
– all directories under var

Use our free module:

You can download and install it for free from here!


You can find how to change the favicon in Magento 2 here