diff --git a/file_browser.install b/file_browser.install
index eefbf58..c8e2e63 100644
--- a/file_browser.install
+++ b/file_browser.install
@@ -18,7 +18,7 @@ function file_browser_install() {
   if (!\Drupal::isConfigSyncing()) {
     $data = file_get_contents(dirname(__FILE__) . '/file_browser_icon.png');
     /** @var \Drupal\file\FileInterface $file */
-    $file = file_save_data($data, 'public://file_browser_icon.png', FileSystemInterface::EXISTS_REPLACE);
+    $file = \Drupal::service('file.repository')->writeData($data, 'public://file_browser_icon.png', FileSystemInterface::EXISTS_REPLACE);
     if ($file) {
       // Set file uuid same as default config.
       $uuid = Yaml::decode(file_get_contents(dirname(__FILE__) . '/config/install/embed.button.file_browser.yml'))['icon_uuid'];
diff --git a/src/Plugin/views/field/FileBrowserPreview.php b/src/Plugin/views/field/FileBrowserPreview.php
index 3c1c33f..51a8716 100644
--- a/src/Plugin/views/field/FileBrowserPreview.php
+++ b/src/Plugin/views/field/FileBrowserPreview.php
@@ -88,7 +88,7 @@ class FileBrowserPreview extends FieldPluginBase {
     // Use a placeholder image for now.
     // @todo See if we can use fallback formatters for this.
     else {
-      $path = drupal_get_path('module', 'file_browser');
+      $path = \Drupal::service('extension.list.module')->getPath('file_browser');
       $build = [
         '#theme' => 'image',
         '#attributes' => [
