문제

I'm trying to modify the Xampp favicon and it's being impossible.

At first I changed the xampp default favicon htdocs/favicon.ico, and It still showing the orange "X".

Then I thought it could be the configuration of my symfony project. So I went to myProyect/web and overwrited the symfony favicon.ico with mine. I have to clarify that before I made this, it didn't show the "SF" black favicon.

And tryed to add the fav icon line to both "base.html.twig" and "layout.html.twig":

<link rel="shortcut icon" href="{{ asset('favicon.ico') }}" />

And also tryed this:

<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />

The favicon file is located in-> htdocs/MyProyect/web/favicon.ico

But I have no clue why is still showing the Xampp default icon... I have erased symfony cache, and both chrome and firefox cache, and still doesn't work.

I'll apreciate some help with this, I'm a Symfony noob and some parts of it is driving me crazy.

Thank to you all.

올바른 솔루션이 없습니다

다른 팁

Your favicon should be in web folder root. If not loading new favicon then use query string like this.

<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}?v=2" />
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top