I use Jekyll for building my web site, and I want to start serving SVG. Browsers won’t recognize SVG as an image unless it is sent with the proper MIME type. Unfortunately, Jekyll does not set the MIME type by default. (To be fair, Jekyll uses Webrick for the HTTP server)
How do I tell Jekyll to use the image/svg+xml mime type for SVG?
_pluginsdirectory in the root of your Jekyll project.svg_mime_type.rbin_pluginsAdd this to
svg_mime_type.rb:That’s it! Next time you start Jekyll, it will use the proper MIME type for SVG.