magento2: 2.1 Cannot upload a .ico as favicon

Steps to reproduce

  1. Install Magento from 2.1 branch.
  2. Go to Content / Configuration
  3. Edit Default theme
  4. Go to Other Settings / HTML Head
  5. Click on ‘Upload’ button for Favicon
  6. Select .ico file

Expected result

  1. .Ico file can be uploaded

Actual result

  1. Error message appears: “Attention, We don’t recognize or support this file extension type.”.

In /vendor/magento/module-config/Model/Config/Backend/Image/Favicon.php there is a method _getAllowedExtensions which allows the ico format.

Other filetypes like svg can be uploaded.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 7
  • Comments: 29 (11 by maintainers)

Commits related to this issue

Most upvoted comments

6 months, no fix 😕

@antboiko Is it possible that this problem is not solved yet?

I found the same problem that not all of the Favicon formats are support. The supported formats in as quoted in de the description are ico, png, gif, jpg, jpeg, apng, svg but actually the supported formats are jpg jpeg gif png svg . The problem can be solved by changing line 70 in module-theme/view/adminhtml/ui_component/design_config_form.xml from <item name="allowedExtensions" xsi:type="string">jpg jpeg gif png svg</item> to <item name="allowedExtensions" xsi:type="string">ico jpg jpeg gif png svg apng</item> .

@lingwooc: this fix is available on the 2.1.8-preview branch, so you’ll get the fix in the next release 😃 See: https://github.com/magento/magento2/commit/406c81796c938a76abed39bf5e5a9dda9218e534

Better late than never! 😄

This is STILL broken in 2.1.7… Why? There’s no reason for this. This is basic functionality, as .ico is the standard accepted format.

@JerryLosey, the 2.1.x series is releasing fairly regularly: about once a month.