One way to retrieve profile image in original size is by making separate API call.
- include gem 'linkedin'
create initializer file /config/initializers/linkedin.rb with content:
LinkedIn.configure do |config| config.token = "your LinkedIn app consumer_key" config.secret = "your consumer_secret" end
in your self.from_omniauth method replace line
user.linkedin_photo_url = auth.info.image
with
client = LinkedIn::Client.new
client.authorize_from_access(auth.extra.access_token.token, auth.extra.access_token.secret)
user.linkedin_photo_url = client.picture_urls.all.first
DONE