Apply conditionally an image style on an User Profile page
This module auto image style, is also available for drupal 8.

It describes:


  Allows to apply an image style depending on whether the orientation of original image is portrait or landscape.


So it might be what you want.