1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 23:59:40 +02:00

Crop profile images

This commit is contained in:
Josh Pigford 2024-10-08 14:25:34 -05:00
parent 78b0674052
commit 41dff228e8
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ class User < ApplicationRecord
enum :role, { member: "member", admin: "admin" }, validate: true
has_one_attached :profile_image do |attachable|
attachable.variant :thumbnail, resize_to_limit: [ 150, 150 ], preprocessed: true
attachable.variant :thumbnail, resize_to_fill: [ 300, 300 ]
end
validate :profile_image_size

View file

@ -34,7 +34,7 @@ Rails.application.configure do
end
# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local
config.active_storage.service = ENV.fetch("ACTIVE_STORAGE_SERVICE", "local").to_sym
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false