view drupal 8 media image field code example
Example: drupal 8 get media image uri
$image_url = $media->field_media_image->entity->getFileUri();
file_create_url($image_url);
$image_url = $media->field_media_image->entity->getFileUri();
file_create_url($image_url);