How to get width and height of user pictures?
You can add an image field to the user entity. Then you can create a custom field formatter that can check if images are over a certain size and display a link to the larger size if they are. Here is an article on creating a field formater in Drupal 7: http://www.computerminds.co.uk/articles/creating-new-field-formatters-drupal-7