An `Image` type field should contain a file `fid` of an image file. The following should resolve your issue:

    $img = $form_state->getValue('image_dir');

    if (!empty($img['fids'])) {
      $img = reset($img['fids']);
    }