Error uploading SVG Font File

AI-generated summary

The discussion revolves around an error when uploading an SVG font file to a Discourse-powered community, with users debating the practicality and compatibility of SVG fonts. youngbobby reports a technical issue where SVG files are being misidentified as images, suggesting a potential bug. codinghorror questions the use of SVG fonts, recommending standard formats like WOFF2, which Discourse already uses and supports widely. youngbobby shares a workaround using Amazon S3 and notes SVG fonts worked for Android Chrome, though they’re not ideal. Mittineague highlights that SVG fonts are largely unsupported except in Safari, making WOFF a better choice. elijah humorously notes Opera Mini’s limitations, while eextra raises concerns about site performance, noting a 2-second load delay after font installation, calling it unacceptable.

I am trying to upload an SVG font file on my Discourse powered community but I keep getting this error:

Sorry, but we couldn’t determine the size of the image. Maybe your image is corrupted?

I feel the svg font file is being read as an image. Possibly a bug ?

In what context is svg font used? Why not use another standard expected font format like woff2?

I had issues where chrome for Android was not working with woff2 and ttf fonts but with .svg fonts, it worked perfectly. I’ve fixed this issue by uploading directly to Amazon s3 but you might want to look into svg fonts for future purposes.

Discourse only sends down the woff2 version of Font Awesome which is fairly aggressive, also required for the site to look normal with glyphs, and we have had zero complaints.

No Opera-mini users? :wink:

I must say, If caniuse is correct, WOFF - Web Open Font Format has broad browser support.

But unfortunately SVG fonts looks to be supported by Safari only

Seeing as Safari supports WOFF is there any real motivation to use SVG font anyway?

I think I have that on my phone. Given that it proxies everything (or just https?) through Opera servers, I trust it somewhat less than I can throw my phone.

Is it normal that on a clean forum without any extras after installing the fonts, the speed of loading the site will increases by almost 2 seconds? This is unacceptable..