mirror of
https://github.com/discourse/discourse.git
synced 2026-08-11 13:35:20 -05:00
FEATURE: Add support for AVIF images (#21680)
This commit is contained in:
+1
-1
@@ -158,7 +158,7 @@ class FileHelper
|
||||
end
|
||||
|
||||
def self.supported_images
|
||||
@@supported_images ||= Set.new %w[jpg jpeg png gif svg ico webp]
|
||||
@@supported_images ||= Set.new %w[jpg jpeg png gif svg ico webp avif]
|
||||
end
|
||||
|
||||
def self.inline_images
|
||||
|
||||
@@ -662,7 +662,7 @@ class UploadCreator
|
||||
if is_animated != nil
|
||||
# FastImage will return nil if it cannot determine if animated
|
||||
is_animated
|
||||
elsif type == "gif" || type == "webp"
|
||||
elsif %w[gif webp avif].include?(type)
|
||||
# Only GIFs, WEBPs and a few other unsupported image types can be animated
|
||||
OptimizedImage.ensure_safe_paths!(@file.path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user