diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a6d96f77..5873f7db 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -61,7 +61,7 @@ module ApplicationHelper # @deprecated Use {User#profile_picture.url} instead. def gravatar_url(user) - return user.profile_picture.url + return user.profile_picture.url :medium # return '/cage.png' #return '//www.gravatar.com/avatar' if user.nil? #return "//www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user)}" if user.is_a? String diff --git a/app/views/user/edit.html.haml b/app/views/user/edit.html.haml index be7ebd6d..fe057bd5 100644 --- a/app/views/user/edit.html.haml +++ b/app/views/user/edit.html.haml @@ -11,13 +11,13 @@ .media .pull-left %div.img-rounded.profile--img{style: 'width:100px;height:100px;overflow:hidden;margin-left:5px:'} - %img#profile-picture-preview{src: current_user.profile_picture.url, style: 'width: 100%; height: 100%'} + %img#profile-picture-preview{src: current_user.profile_picture.url(:medium), style: 'width: 100%; height: 100%'} .media-body = f.file_field :profile_picture .well#profile-picture-crop-controls{style: 'display: none;'} %strong Adjust image - %img#profile-picture-cropper{src: current_user.profile_picture.url} + %img#profile-picture-cropper{src: current_user.profile_picture.url(:medium)} = f.text_field :motivation_header, label: "Motivation header", placeholder: 'Ask me anything!'