0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

🎉 Accept (animated) gif as a valid image format

This commit is contained in:
Andrés Moya 2020-08-11 12:23:41 +02:00 committed by Andrey Antukh
parent 91899be423
commit 5ff0a723d5

View file

@ -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))