Lucas Tomic Asked: 2020-06-28 12:13:25 +0800 CST 2020-06-28 12:13:25 +0800 CST 2020-06-28 12:13:25 +0800 CST How to add favicon in laravel? 772 I'm trying to change the favicon in a laravel project, but for some reason it doesn't work... This is what I added in the head <link rel="icon" href="img/favicon.ico"> html 3 Answers Voted Best Answer Daniel Correa Hincapie 2020-07-03T11:35:52+08:002020-07-03T11:35:52+08:00 Hello, you must add this in the header of your app: <link rel="shortcut icon" type="image/png" href="{{ asset('/img/favicon_192x192.png') }}"> <link rel="shortcut icon" sizes="192x192" href="{{ asset('/img/favicon_192x192.png') }}"> then you must run the commands: php artisan config:cache php artisan cache:clear reload the application and you should be able to see the icon you put, I hope I have helped you. Orici 2020-06-28T12:46:36+08:002020-06-28T12:46:36+08:00 Don't use relative paths, use the helper asset(): <link rel="icon" href="{{ asset('images/favicon.ico') }}"> Where the icon is located in "public/images/favicon.ico". Yohanna 2020-06-28T14:33:35+08:002020-06-28T14:33:35+08:00 try this <link rel="shortcat icon" href="images/favicon.jpg"> It works like this for me
Hello, you must add this in the header of your app:
then you must run the commands:
reload the application and you should be able to see the icon you put, I hope I have helped you.
Don't use relative paths, use the helper
asset()
:Where the icon is located in "public/images/favicon.ico".
try this
It works like this for me