How to get the user_picture styled I have a $user and what to get the style image as a URL

originally found this answer How do I access a user image? 

but it was not what I was looking for
I have found this to work 

Use Drupal\image\Entity\ImageStyle;
$file_uri = $user-&gt;get('user_picture')-&gt;entity-&gt;getFileUri();
$styled_image_url = ImageStyle::load("large")-&gt;buildUrl($file_uri);