I am new to react. Could someone help me in adding favicon to react application. I have created favicon package and added generated code to index.html
. But I am not knowing how this href
to favicon to be specified.
Thanks.
Just Navigate to public Folder in your react project and then remove the file named favicon. ico. Then after you should replace that file with your favorite icon or any png image by renaming it as favicon.
To add a favicon to your website, either save your favicon image to the root directory of your webserver, or create a folder in the root directory called images, and save your favicon image in this folder. A common name for a favicon image is "favicon.ico".
Simply navigate to the address of the favicon. ico file. If this page shows the old icon, just press Ctrl+F5 to refresh without cache. Then reload your original site.
You can add favicon.ico to public/images then enter the index.html and add the code.
<link rel="shortcut icon" href="./images/favicon.ico">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With