0

How can i change the favicon icon in the template with file type: .svg

I just started to learn magento, even though I've been looking for resources on the internet to do it, I haven't been able to

2 Answers 2

1

I tried changing the favicon with .ico and .png but only .ico worked in my case. It is also mentioned in dev docs that Not all browsers support all these formats.

enter image description here

Here are the steps which I followed

Step 1:- Create app/design/<Vendor_folder>//Magento_Theme/layout/default_head_blocks.xml

<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.ico" rel="icon" sizes="32x32" />
</head>

Step 2: Create Magento_Theme/web directory and add you favicon to it.

Result:

Output

0

You can do this through the admin cms:

Content->Design->configuration

enter image description here

Go to HTML Head

Set Favicon icon

1
  • If it's in the code, how would I fix it? and edit in which file
    – tanh
    Commented Jan 18, 2023 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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