# How do I reference favicons in my /public-folder?

**URL:** https://discourse.roots.io/t/how-do-i-reference-favicons-in-my-public-folder/23536
**Category:** sage
**Tags:** bud, sage10
**Created:** 2022-07-11T10:07:40Z
**Posts:** 13
**Showing post:** 4 of 13

## Post 4 by @strarsis — 2022-07-11T11:52:47Z

> [@el_skak](#):
>
> Uncaught Error: Call to undefined function app()

This appears to be the same issue as this very recent one:

> [@Acorn - asset() doesn't work](https://discourse.roots.io/t/acorn-asset-doesnt-work/23517):
>
> Hi, i have a problem with asset functions in Acorn. I use this docs: [Acorn 2.x: Assets Management | Roots Documentation](https://docs.roots.io/acorn/2.x/assets-management/#helper-functions) And this is my code: public function generateCriticalCSS(): void { $asset = \Roots\asset('speed.css'); $critical\_content = $asset-\>contents(); $style = "\<style\>{$critical\_content}\</style\>"; echo $style; } But it doesnt work. So i copy one line of this code to setup.php $asset = \Roots\asset('speed.css'); Fa…

This article may be interesting:  
[https://www.sitepoint.com/all-you-need-to-know-about-the-new-wordpress-site-icon-api/](https://www.sitepoint.com/all-you-need-to-know-about-the-new-wordpress-site-icon-api/)  
WordPress already adds HTML for the site icon, as with  
[https://developer.wordpress.org/reference/functions/wp\_site\_icon/](https://developer.wordpress.org/reference/functions/wp_site_icon/)

So just using the `get_site_icon_url` may already result in the HTML you need.

---

_[View the full topic](https://discourse.roots.io/t/how-do-i-reference-favicons-in-my-public-folder/23536)._
