voyager
voyager copied to clipboard
Voyager Font and Dimmer Images not working
Laravel version
9.5.1
PHP version
8.0.8
Voyager version
1.6.x-dev
Database
libmysql - mysqlnd 8.0.8
Description
Voyager fonts and dimmer images not loading on Chrome and Safari Browsers, but it is working absolutely fine in Firefox.
Not Working in Chrome and Safari
Steps to reproduce
Install Laravel 9 Require TCG/Voyager
Expected behavior
It should show the Voyager fonts icons and dimmer images. I have also cleared cache, run optimize command, check the ap url and also link storage.
Screenshots
No response
Additional context
No response
Anything in your browser dev tools/console? I'd expect to see some kind of error related to the font files. The type of error shown will help identify cause. This does work fine, so it's not a bug with Voyager, but something about your setup
I am getting these errors on my console. Failed to decode downloaded font: http://localhost:8000/admin/voyager-assets?path=fonts/voyager.woff menus:1 OTS parsing error: invalid sfntVersion: 538976288 menus:1 Failed to decode downloaded font: http://localhost:8000/admin/voyager-assets?path=fonts/voyager.ttf menus:1 OTS parsing error: invalid sfntVersion: 538976288
Sorry for late response.
https://stackoverflow.com/questions/34288778/failed-to-decode-downloaded-font-ots-parsing-error-invalid-version-tag-rails
Not exactly the same environment, but same error reported, which is that your browser can't parse the font files for some reason. Open up the network tab and find those requests and I'd bet you'll find a 404 or some other response with HTML content. If this is the case, there's something wrong with how you're hosting your laraval instance.
i got same issue
I found that all files from voyager-asset include two blank lines when on chrome. So images and fonts cannot display
That's a JS file, so whitespace is fine. That's very much not the cause of your issue.
it is not in js file. even in SVG file and font file
Yes, but the screenshot you provided was of a JS file
so it cannot decode font or not show svg file
In svg file

OH. I found my issue. this is because in some files I place <?PHP in line 2.
Yup, that would definitely do it. Glad you found it