diff --git a/.dockerignore b/.dockerignore index 491fc35..996cb5c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,9 @@ node_modules lib +Dockerfile +Dockerfile.arm32v7 +Dockerfile.arm64v8 +README.md +.all-contributorsrc +env.example +.github/ diff --git a/src/library/types.cr b/src/library/types.cr index a4de007..0545184 100644 --- a/src/library/types.cr +++ b/src/library/types.cr @@ -1,4 +1,12 @@ -SUPPORTED_IMG_TYPES = ["image/jpeg", "image/png", "image/webp"] +SUPPORTED_IMG_TYPES = %w( + image/jpeg + image/png + image/webp + image/apng + image/avif + image/gif + image/svg+xml +) enum SortMethod Auto diff --git a/src/util/util.cr b/src/util/util.cr index 833f1ca..9f5ffee 100644 --- a/src/util/util.cr +++ b/src/util/util.cr @@ -35,6 +35,11 @@ def register_mime_types # FontAwesome fonts ".woff" => "font/woff", ".woff2" => "font/woff2", + + # Supported image formats. JPG, PNG, GIF, WebP, and SVG are already + # defiend by Crystal in `MIME.DEFAULT_TYPES` + ".apng" => "image/apng", + ".avif" => "image/avif", }.each do |k, v| MIME.register k, v end