Question

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.

No correct solution

OTHER TIPS

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" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top