diff options
author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2019-02-02 20:25:04 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-02-02 12:25:04 +0100 |
commit | 5092d17f2936146fa26e5d8a9b9e391f77010f28 (patch) | |
tree | 6cf36df80ff7cfc402cc52a4b0f4f85f62210fd5 /app/models/media_attachment.rb | |
parent | b253d3e0c2591700f597ad63a93bc62c5f48409d (diff) |
Add WebP support (#9879)
* Add WebP support * Remove the changes to the tooltip refs: https://github.com/tootsuite/mastodon/pull/9879#pullrequestreview-199312528
Diffstat (limited to 'app/models/media_attachment.rb')
-rw-r--r-- | app/models/media_attachment.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index 6b939124f..2e0f98cc6 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -25,10 +25,10 @@ class MediaAttachment < ApplicationRecord enum type: [:image, :gifv, :video, :unknown] - IMAGE_FILE_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.gif'].freeze + IMAGE_FILE_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.gif', '.webp'].freeze VIDEO_FILE_EXTENSIONS = ['.webm', '.mp4', '.m4v', '.mov'].freeze - IMAGE_MIME_TYPES = ['image/jpeg', 'image/png', 'image/gif'].freeze + IMAGE_MIME_TYPES = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'].freeze VIDEO_MIME_TYPES = ['video/webm', 'video/mp4', 'video/quicktime'].freeze VIDEO_CONVERTIBLE_MIME_TYPES = ['video/webm', 'video/quicktime'].freeze |