Right mime type for SVG images with fonts embedded

后端 未结 1 1104
情书的邮戳
情书的邮戳 2020-12-23 13:04

This is the usual SVG mime type:

image/svg+xml

And it works great. However, when embedding an SVG font, chrome tells you the mime type is i

相关标签:
1条回答
  • 2020-12-23 13:27

    There's only one registered mediatype for SVG, and that's the one you listed, image/svg+xml. You can of course serve SVG as XML too, though browsers tend to behave differently in some scenarios if you do, for example I've seen cases where SVG used in CSS backgrounds fail to display unless served with the image/svg+xml mediatype.

    0 讨论(0)
提交回复
热议问题