diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-29 14:20:15 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-29 14:20:15 +0100 |
commit | 5973ca3d111e65385299d47b6b82df48a0a5f67b (patch) | |
tree | ac25ce54ed921a0b6daad6626ad3f96eb6087490 /app/models | |
parent | cc70f28f195335f4775f7b6aafe7d90210e8b700 (diff) |
Upgrade Paperclip to 5, AWS-SDK to 2, do not generate medium/small versions of avatars
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/account.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index f1a4d4b4f..0f3d0dda2 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -13,12 +13,12 @@ class Account < ApplicationRecord validates :username, presence: true, uniqueness: { scope: :domain, case_sensitive: true }, unless: 'local?' # Avatar upload - has_attached_file :avatar, styles: { large: '300x300#', medium: '96x96#', small: '48x48#' } + has_attached_file :avatar, styles: { large: '300x300#' }, convert_options: { all: '-strip' } validates_attachment_content_type :avatar, content_type: IMAGE_MIME_TYPES validates_attachment_size :avatar, less_than: 2.megabytes # Header upload - has_attached_file :header, styles: { medium: '700x335#' } + has_attached_file :header, styles: { medium: '700x335#' }, convert_options: { all: '-strip' } validates_attachment_content_type :header, content_type: IMAGE_MIME_TYPES validates_attachment_size :header, less_than: 2.megabytes |