1

According to devdocs of magento 2.3.0 I tried to add a favicon manually.

https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/favicon.html

Attempt 1:

/magento2/app/design/frontend/Magento GJ/theme-GJ/Magento_Theme/layout => here goes the default_head_blocks.xml file

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <link src="Magento_Theme::favicon_32x32.png" rel="icon" type="image/x-icon" sizes="32x32"/>
    </head>
</page>

/magento2/app/design/frontend/Magento GJ/theme-GJ/Magento_Theme/web => here goes the favicon_32x32.png file

=> This works only in Firefox!

Attempt 2:

Then I tried just for fun to add in the root directory my own favicon.ico.

/magento2/app/design/frontend/Magento GJ/theme-GJ/Magento_Theme/

=> This works for Safari, Chrome and Edge. The IE does not work.

Attempt 3:

According to the magento 2.3.0 bug to add a favicon over the backend I solved this issue also:

Magento 2.3 favicon and logo upload does not take hold

Then I tried to upload my favicon. => All browsers can handle the favicon.

I want to know why the first attempt does not work for all browsers? - I am at a loss :/

0

Magento favicon icon with type="image/x-icon" should be of file type .ico, in your case you used a .png instead and that makes it behave abnormally.
To validate it, try using a favicon.ico file

  • thanks to your support. I solved this issue: For IE: The favicon.ico should be placed in the root directory => this means in Magento_Theme directory. For Chrome/Firefox/Safari The favicon.ico should be placed in the web directory => this means in Magento_Theme/web directory as it is mentioned devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/… – Samuel Demir Apr 2 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.