diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-10-05 23:41:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-05 23:41:47 +0200 |
commit | b9c76e2edbc372e1b472f6ba480631b79fe24722 (patch) | |
tree | 86938e4c82781404d8adfde2555e1c26b77209b4 /app/models | |
parent | 2559d9166cea24fceb9b72ca112804811d87a4a8 (diff) |
When processing custom emoji, ensure a non-animated version exists (#5230)
Use the non-animated version in web UI, but return both in API
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/custom_emoji.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/custom_emoji.rb b/app/models/custom_emoji.rb index e80c58155..9e9be5e12 100644 --- a/app/models/custom_emoji.rb +++ b/app/models/custom_emoji.rb @@ -21,7 +21,7 @@ class CustomEmoji < ApplicationRecord :(#{SHORTCODE_RE_FRAGMENT}): (?=[^[:alnum:]:]|$)/x - has_attached_file :image + has_attached_file :image, styles: { static: { format: 'png', convert_options: '-coalesce -strip' } } validates_attachment :image, content_type: { content_type: 'image/png' }, presence: true, size: { in: 0..50.kilobytes } validates :shortcode, uniqueness: { scope: :domain }, format: { with: /\A#{SHORTCODE_RE_FRAGMENT}\z/ }, length: { minimum: 2 } |