2

I'm using React + Webpack. I'm currently trying to install a favicon but it's not working.

I have this in my public/index.html file:

<link rel="apple-touch-icon" sizes="57x57" href="%PUBLIC_URL%/icons/apple-icon-57x57.png"/>
<link rel="apple-touch-icon" sizes="60x60" href="%PUBLIC_URL%/icons/apple-icon-60x60.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="%PUBLIC_URL%/icons/apple-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="76x76" href="%PUBLIC_URL%/icons/apple-icon-76x76.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="%PUBLIC_URL%/icons/apple-icon-114x114.png"/>
<link rel="apple-touch-icon" sizes="120x120" href="%PUBLIC_URL%/icons/apple-icon-120x120.png"/>
<link rel="apple-touch-icon" sizes="144x144" href="%PUBLIC_URL%/icons/apple-icon-144x144.png"/>
<link rel="apple-touch-icon" sizes="152x152" href="%PUBLIC_URL%/icons/apple-icon-152x152.png"/>
<link rel="apple-touch-icon" sizes="180x180" href="%PUBLIC_URL%/icons/apple-icon-180x180.png"/>
<link rel="icon" type="image/png" sizes="192x192" href="%PUBLIC_URL%/icons/android-icon-192x192.png"/>
<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/icons/favicon-32x32.png"/>
<link rel="icon" type="image/png" sizes="96x96" href="%PUBLIC_URL%/icons/favicon-96x96.png"/>
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/icons/favicon-16x16.png"/>
<link rel="manifest" href="%PUBLIC_URL%/icons/manifest.json">

And this is my public folder:

public
├── icons
│   ├── android-icon-144x144.png
│   ├── android-icon-192x192.png
│   ├── android-icon-36x36.png
│   ├── android-icon-48x48.png
│   ├── android-icon-72x72.png
│   ├── android-icon-96x96.png
│   ├── apple-icon-114x114.png
│   ├── apple-icon-120x120.png
│   ├── apple-icon-144x144.png
│   ├── apple-icon-152x152.png
│   ├── apple-icon-180x180.png
│   ├── apple-icon-57x57.png
│   ├── apple-icon-60x60.png
│   ├── apple-icon-72x72.png
│   ├── apple-icon-76x76.png
│   ├── apple-icon-precomposed.png
│   ├── apple-icon.png
│   ├── browserconfig.xml
│   ├── favicon-16x16.png
│   ├── favicon-32x32.png
│   ├── favicon-96x96.png
│   ├── favicon.ico

However, when I load the page it tells me that those icons don't exist.

enter image description here

Which part of the webpack config allows me to open access to the public folder?

bigpotato
  • 26,262
  • 56
  • 178
  • 334

0 Answers0