2020-05-02 09:45:11 -07:00
|
|
|
class ProfilePictureUploader < BaseUploader
|
2020-05-01 15:43:46 -07:00
|
|
|
def default_url(*args)
|
2022-07-10 09:32:27 -07:00
|
|
|
"/images/#{[version_name || args.first, 'no_avatar.png'].compact.join('/')}"
|
2020-05-01 15:43:46 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
version :large do
|
|
|
|
process resize_to_fit: [500, 500]
|
|
|
|
end
|
|
|
|
version :medium do
|
|
|
|
process resize_to_fit: [256, 256]
|
|
|
|
end
|
|
|
|
version :small do
|
|
|
|
process resize_to_fit: [80, 80]
|
|
|
|
end
|
|
|
|
end
|