SVG MIME type change in 0.43

It appears 0.43 has changed the MIME type for .svg files using the built in server (“hugo serve”). Using 0.43, the local server sends down .svg files as “image/svg; charset=utf-8” which causes browsers to want to download rather than display the file. I identified the issue because two social icons in the nav on my site no longer display correctly under 0.43.

As a test, I downloaded the binary for 0.42.2, ran it in my local directory, and it correctly used the “image/svg+xml” MIME type. I’ve tested this on two machines (Macbook and iMac both running 10.13.6) and the issue seems to be consistent.

Is anyone else seeing this issue? Should I file an issue on the github repo?

Hi - thanks for the report; this is a known issue: https://github.com/gohugoio/hugo/issues/4920

2 Likes

Great. I had searched for it on Github but missed that. Glad to see the team is already on it!

1 Like

Please see 0.44 release @john_b :