Accessing the uri within the template_preprocess_image_formatter I am using template_preprocess_image_formatter and I am trying to access the uri protected property inside the URL array (see screenshot)

  

does anybody know how to access it?
i've sorted it

you can do it like this

$variables['url']-&gt;getUri()