FEATURE: Add support for AVIF images (#21680)

This commit is contained in:
Rafael dos Santos Silva
2023-05-24 16:13:36 -03:00
committed by GitHub
parent f3f841a018
commit baa5389a23
7 changed files with 18 additions and 16 deletions

View File

@@ -175,7 +175,7 @@ class OptimizedImage < ActiveRecord::Base
paths.each { |path| raise Discourse::InvalidAccess unless safe_path?(path) }
end
IM_DECODERS ||= /\A(jpe?g|png|ico|gif|webp)\z/i
IM_DECODERS ||= /\A(jpe?g|png|ico|gif|webp|avif)\z/i
def self.prepend_decoder!(path, ext_path = nil, opts = nil)
opts ||= {}