mirror of
https://github.com/discourse/discourse.git
synced 2025-02-12 02:36:16 +08:00
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:
parent
6b500ca263
commit
32e7ee4867
|
@ -183,7 +183,7 @@ class OptimizedImage < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
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)
|
def self.prepend_decoder!(path, ext_path = nil, opts = nil)
|
||||||
opts ||= {}
|
opts ||= {}
|
||||||
|
|
|
@ -1221,7 +1221,7 @@ files:
|
||||||
list_type: compact
|
list_type: compact
|
||||||
authorized_extensions:
|
authorized_extensions:
|
||||||
client: true
|
client: true
|
||||||
default: "jpg|jpeg|png|gif|heic|heif"
|
default: "jpg|jpeg|png|gif|heic|heif|webp"
|
||||||
refresh: true
|
refresh: true
|
||||||
type: list
|
type: list
|
||||||
list_type: compact
|
list_type: compact
|
||||||
|
|
Loading…
Reference in New Issue
Block a user