Get parent entity in media preprocess hook
i have ended up doing:
function hook_preprocess_media__picture__image_without_link(array &amp;$variables) {
   $media = $variables['elements']['#media'];
   $parent = Drupal::entityTypeManager()-&gt;getStorage('paragraph')-&gt;loadByProperties([
    'field_paragraph_image_ref' =&gt; $media-&gt;id()
  ]);
   $parent = reset($parent);
   var_dump($parent-&gt;get(&quot;field_paragraph_image_link_page&quot;)-&gt;getValue();
}