Failed to load resource: fontawesome-webfont.woff2 Laravel 5.5

1.8k Views Asked by At

I am writing a web application and trying to use font-awesome icons. The fonts are imported to the right directories but when I load the page the icons appear as blank squares. (Example in attached picture).

enter image description here

When I press F12 this is the error I get: (Also in attached picture)

Failed to load resource: the server responded with fontawesome-webfont.woff2 a status of 404 (Not Found)

Failed to load resource: the server responded with fontawesome-webfont.woff a status of 404 (Not Found)

Failed to load resource: the server responded with fontawesome-webfont.ttf a status of 404 (Not Found)

enter image description here

Those files do exist and I can see them. I managed to find some solutions by changing the web.config file but this is not helping with laravel. I can't find any appropriate solution for laravel 5.5 online. Would appreciate help!

PS - I don't know yet if this is relevant, but I use the icons in vue.js components.

1

There are 1 best solutions below

0
On

IIS will not serve files of unknown type.

  1. In IIS, go to MIME Types.
  2. Right click in a blank area and select Add.
  3. File name extension: .woff2
  4. MIME type: font/x-woff
  5. Click OK

enter image description here