feat: allow webp

This commit is contained in:
Shivam Mishra
2024-02-29 17:04:20 +05:30
parent 62a9d8372b
commit acd41b6081
+1 -1
View File
@@ -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