FEATURE: Adds support for the WEBP image format (#11532)

Adds support for both still and animated webp images.
Animated images won't be optimized or get thumbnails.

Depends on https://github.com/discourse/discourse_docker/pull/506
and https://github.com/discourse/discourse_docker/pull/507
This commit is contained in:
Rafael dos Santos Silva 2020-12-21 20:09:00 -03:00 committed by GitHub
parent 6b500ca263
commit 32e7ee4867
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -1221,7 +1221,7 @@ files:
list_type: compact
authorized_extensions:
client: true
default: "jpg|jpeg|png|gif|heic|heif"
default: "jpg|jpeg|png|gif|heic|heif|webp"
refresh: true
type: list
list_type: compact