diff --git a/web/backend/embed.go b/web/backend/embed.go index 556fb7384..a20fc5dcd 100644 --- a/web/backend/embed.go +++ b/web/backend/embed.go @@ -4,6 +4,7 @@ import ( "embed" "io/fs" "log" + "mime" "net/http" "path" "strings" @@ -12,6 +13,12 @@ import ( //go:embed all:dist var frontendFS embed.FS +func init() { + // Register correct MIME type for SVG files + // Go's mime package doesn't register .svg with the correct type by default + mime.AddExtensionType(".svg", "image/svg+xml") +} + // registerEmbedRoutes sets up the HTTP handler to serve the embedded frontend files func registerEmbedRoutes(mux *http.ServeMux) { // Attempt to get the subdirectory 'dist' where Vite usually builds