favicon not being displayed

following the docs https://filamentphp.com/docs/3.x/panels/themes#adding-a-favicon i tried changing the favicon but it displays the default globe, even do the same asset path being used outside of fillament displays the png correctly on a blade file, any help? file size 14kb using in all panels ->favicon(asset('assets/images/logo.png'))
3 Replies
Mohamed Ayaou
Mohamed Ayaou3d ago
does your browser console throes any 404 errors? some browsers fetches the /favicon.ico directly from the root dir (/public in laravel case) so make sure to have a copy in there or change it path to the public The format may cuase an issue too, make sure it's .ico and check from different browsers as well as refreshing the browser cache (ctrl/cmd + shift + r)
Wrax
Wrax3d ago
first try php artisan optimize
Wrax
Wrax3d ago
You can also configure favicon globally from the <head> of your layout file.
<!-- Favicons -->
<link rel="icon" href="{{ asset('favicon.ico')}}" sizes="32x32">

<link rel="icon" type="image/svg+xml" sizes="any" href="data:image/svg+xml,...">

<link rel="apple-touch-icon" href="{{ asset('apple-touch-icon.png')}}">

<link rel="manifest" href="{{ asset('site.webmanifest') }}">
<!-- Favicons -->
<link rel="icon" href="{{ asset('favicon.ico')}}" sizes="32x32">

<link rel="icon" type="image/svg+xml" sizes="any" href="data:image/svg+xml,...">

<link rel="apple-touch-icon" href="{{ asset('apple-touch-icon.png')}}">

<link rel="manifest" href="{{ asset('site.webmanifest') }}">
No description

Did you find this page helpful?