Favicon
Created 7 years ago by vickencode

Hi All, So I tried to leverage the favicon.ico that is commented out when initial custom theme is scaffolded. I added a img directory and my favicon i.e. img/favicon, but it threw an error: Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN) Method Anomaly\Streams\Platform\Image\Image::__toString() must not throw an exception, caught ErrorException: filemtime(): stat failed for /Users/developer/workstation/properties/laravel/learn/luapp/public/app/appslug/assets//187057d83e4ff51f25cba86bd0afdaad. What am I doing wrong?

ryanthompson  —  7 years ago

File doesn't exist sounds like. Also please try and use a liiiiittle more detailed titles 😊

vickencode  —  7 years ago

I will try my best to be a bit clearer. I even changed it to .png, after discovering this server doesn't support .ico, so it stopped erroring, which is nice, and continued to show the default pyro favicon in the tab. Therefore, I created a folder and added a file in my custom theme resources like this: img/favicon.png To leverage this which came out of the box:

And instead of showing my favicon, chrome prints this: <link rel="shortcut icon" href="<img src="http:="" lucktastic.dev="" app="" luckslug="" assets="" addons="" lucktastic="" demo-theme="" resources="" img="" 3708d928697bded410235c430b103d00.png?v="1498073548"" alt="Favicon">

ryanthompson  —  7 years ago

What's the path to your image in the file system and what's your img tag in the view?

flexnst  —  7 years ago

Hi guys, I found the problem when I installed the latest version of the system. In the starter theme, the links to the icons are not indicated correctly:

// file: core/pyrocms/starter-theme/resources/views/partials/metadata.twig:20-45
image_url ('pyrocms.theme.accelerant::img/favicons/...')

but it is necessary:

image_url ('pyrocms.theme.starter::img/favicons/...')

Please fix in new version!

ryanthompson  —  7 years ago

@flexnst This has been resolved and the added function to simply things is documented here: https://pyrocms.com/documentation/streams-plugin/latest#usage/favicons