Why do SVG images compile into the fonts folder?
See original GitHub issueI’m wondering why this behavior happens and how to override it?
Regular images (png, jpg) go into the correct images
folder. but SVG’s all go to the fonts
folder.
My css:
.foo{ background: url(../images/normal_icon.png) }
.bar{ background: url(../images/icon.svg) }
Converts to:
.foo { background: url(/image/normal_icon.png?id=a72845c0a452ccc7003a) }
.bar { background: url(/fonts/icon.svg?id=085742210e6d227f68b0) }`
My mix file is:
const { mix } = require('laravel-mix')
mix.setPublicPath('public')
.js('app/Assets/js/app.js', 'js')
.sass('app/Assets/css/test.scss', 'css')
.copy('app/assets/images', 'public/images', false)
.version()
.version('public/images/**/*')
.disableNotifications();
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Why do SVG images compile into the fonts folder? · Issue #1231
Regular images (png, jpg) go into the correct images folder. but SVG's all go to the fonts folder. My css: .foo{ background: url(....
Read more >Using Custom Fonts With SVG in an Image Tag | CSS-Tricks
When we produce a PNG image, we use an <img> tag or a CSS background, and that's about it. It is dead simple...
Read more >What Is an SVG Font? All About SVG Fonts
An SVG font is a new version of the OpenType format, with SVG standing for Scalable Vector Graphics. The SVG glyph format allows...
Read more >Why is my SVG file not using my font file? - Stack Overflow
Make sure the desired font is installed locally (in you OS). Open your svg in an graphic editor like inkscape.
Read more >Building an SVG Icon Font - CDNify
Grouping: Icon fonts are grouped into one file which means only one http request. Scaling: Vectors can be resized without losing image quality....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI: SVG fonts are deprecated and useless anyway, really don’t see any point of having this - https://caniuse.com/#feat=svg-fonts
In fact, it would be nice to have SVGs moved into some other place than just
images
directory, likevectors
, or something that can be configured by modifying the variable.@JeffreyWay
@heihachi88
I had a simple fix for this but it go closed.
https://github.com/JeffreyWay/laravel-mix/pull/672
I simply can not see why this would not go through now, since there is an overwhelming response to drop SVG’s from being seen as fonts.