0

I am encountering an issue when theming on Magento CLI 2.3.5-p1. I want to customize the favicon.

During my first attempt I just drop a new icon on web folder and named it favicon.ico. It works but only when I am on the customer login page (my theme inherits from blank). So that's the first issue : I want my icon to show on every pages.

Then I tried doing it with an image with custom name. It didn't worked at all. I don't know what to do I have followed EVERY tutorials.

Here is my theme arborescence :

|Violette
|-themeviolette
|---Magento_Theme
|-----layout
|-------default_head_blocks.xml
|-----web
|------favicon.ico
|---media
|---registration.php
|---theme.xml

My default_head_blocks.xml :

<?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::vio.ico" rel="icon" sizes="16x16" type="image/x-icon" />
    </head>
</page>

Thank you very much for saving me

2 Answers 2

0

What you are doing looks correct

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

What if you try via admin config? Same results?

If you switch browser do you see icon on other pages?

1
  • Thank you for your answer ! I actually see my icon on every pages except home. I just tried it with another browser and same results. I didn't try it via admin because I want to practice theming by my own and I feel like using the admin panel is a little bit like cheating... Commented Mar 5, 2021 at 8:36
0

I solved the problem by changing the line endings of my files from CTRL to LF (I am working on a remote server from Windows)

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.