From 5ff0a723d593b5ba8f4961e9fd438d8fd31870ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Tue, 11 Aug 2020 12:23:41 +0200 Subject: [PATCH] :tada: Accept (animated) gif as a valid image format --- common/uxbox/common/media.cljc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/uxbox/common/media.cljc b/common/uxbox/common/media.cljc index 2b0f385347..16ad98f868 100644 --- a/common/uxbox/common/media.cljc +++ b/common/uxbox/common/media.cljc @@ -13,7 +13,7 @@ [cuerdas.core :as str])) (def valid-media-types - #{"image/jpeg", "image/png", "image/webp", "image/svg+xml"}) + #{"image/jpeg", "image/png", "image/webp", "image/gif", "image/svg+xml"}) (def str-media-types (str/join "," valid-media-types)) @@ -23,6 +23,7 @@ :png ".png" :jpeg ".jpg" :webp ".webp" + :gif ".gif" :svg ".svg")) (defn format->mtype @@ -31,6 +32,7 @@ :png "image/png" :jpeg "image/jpeg" :webp "image/webp" + :gif "image/gif" :svg "image/svg+xml")) (defn mtype->format @@ -39,6 +41,7 @@ "image/png" :png "image/jpeg" :jpeg "image/webp" :webp + "image/gif" :gif "image/svg+xml" :svg nil))