Get Current Applied Image Style Name How do you get the currently chosen image style name from the field format display option?

I can load an image with a given style with the code below, however, the style name (e.g. thumbnail) is hard-coded.

$imageStyle = \Drupal::entityTypeManager()
  -&gt;getStorage('image_style')
  -&gt;load('thumbnail');


I am hoping to get the selected style name dynamically.

MYMODULE.module:

HOOK_preprocess_menu() {

  $imagePath = getUser()['currentUser']-&gt;$imageFieldName
    -&gt;entity-&gt;uri-&gt;value;

  $imageStyleFormatterValue = ???;

  $imageStyle = \Drupal::entityTypeManager()
    -&gt;getStorage('image_style')
    -&gt;load($imageStyleFormatterValue);

  $imageStyleURL = $imageStyle
    -&gt;buildUrl($imagePath);

  $markup = new TranslatableMarkup(
    '&lt;span style="background-image: url(@imageStyleURL);"&gt;&lt;/span&gt;', [
      '@imageStyleURL' =&gt; $imageStyleURL,
    ]
  );

}


For my case, $imageStyleURL will be printed as background-image: url();, so I need to build the path in preprocess.

I've tried going through FieldConfig, -&gt;entity, and FieldStorage, but cannot find the image style value stored anywhere.
Field format display options are components of view modes, stored in the config entity EntityViewDisplay.

For example, load the default view mode for the user and extract the configured image style of the user_picture field:

use Drupal\Core\Entity\Entity\EntityViewDisplay;

  $component = EntityViewDisplay::load('user.user.default')-&gt;getComponent('user_picture');
  $image_style = $component['settings']['image_style'];