From acd41b608170643aba42cc1c4d112c2759823edd Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 29 Feb 2024 17:04:20 +0530 Subject: [PATCH] feat: allow webp --- app/models/concerns/avatarable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/concerns/avatarable.rb b/app/models/concerns/avatarable.rb index 94ca55037..b9254c066 100644 --- a/app/models/concerns/avatarable.rb +++ b/app/models/concerns/avatarable.rb @@ -30,7 +30,7 @@ module Avatarable errors.add(:avatar, 'is too big') if avatar.byte_size > 15.megabytes - acceptable_types = ['image/jpeg', 'image/png', 'image/gif'].freeze + acceptable_types = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'].freeze errors.add(:avatar, 'filetype not supported') unless acceptable_types.include?(avatar.content_type) end end