diff --git a/engine/constants.go b/engine/constants.go index c0914f53..283a55ce 100644 --- a/engine/constants.go +++ b/engine/constants.go @@ -7,3 +7,10 @@ var ContentTypes = map[string]string{ "bmp": "image/bmp", "gif": "image/gif", } + +var MimeTypes = []string{ + "image/jpeg", + "image/png", + "image/bmp", + "image/gif", +} diff --git a/engine/engine.go b/engine/engine.go index c3658141..058b4938 100644 --- a/engine/engine.go +++ b/engine/engine.go @@ -30,13 +30,8 @@ func New(cfg config.Config) *Engine { if cfg.Backends == nil { b = append(b, Backend{ - Backend: &backend.GoImage{}, - mimetypes: []string{ - "image/jpeg", - "image/png", - "image/bmp", - "image/gif", - }, + Backend: &backend.GoImage{}, + mimetypes: MimeTypes, }) } else { if cfg.Backends.Lilliput != nil {