diff --git a/src/Plugin/migrate/process/MigrateProcessInlineImages.php b/src/Plugin/migrate/process/MigrateProcessInlineImages.php
index 1e1aff3..1c78fe1 100644
--- a/src/Plugin/migrate/process/MigrateProcessInlineImages.php
+++ b/src/Plugin/migrate/process/MigrateProcessInlineImages.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\migrate_process_inline_images\Plugin\migrate\process;
 
+use Drupal\Core\StreamWrapper\LocalStream;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\File\FileSystemInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
@@ -171,8 +172,8 @@ class MigrateProcessInlineImages extends ProcessPluginBase implements ContainerF
       . $this->fileSystem->basename($imagePath);
     // Modify the destination filename if necessary.
     $replace = !empty($this->configuration['rename']) ?
-      FILE_EXISTS_RENAME :
-      FILE_EXISTS_REPLACE;
+      FileSystemInterface::EXISTS_RENAME :
+      FileSystemInterface::EXISTS_REPLACE;
     $final_destination = file_destination($destination, $replace);
 
     // Try opening the file first, to avoid calling file_prepare_directory()
@@ -182,7 +183,7 @@ class MigrateProcessInlineImages extends ProcessPluginBase implements ContainerF
     if (!$destination_stream) {
       // If fopen didn't work, make sure there's a writable directory in place.
       $dir = $this->fileSystem->dirname($final_destination);
-      if (!file_prepare_directory($dir, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS)) {
+      if (!\Drupal::service('file_system')->prepareDirectory($dir, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS)) {
         throw new MigrateException("Could not create or write to directory '$dir'");
       }
       // Let's try that fopen again.
@@ -240,7 +241,7 @@ class MigrateProcessInlineImages extends ProcessPluginBase implements ContainerF
 
     $this->determineAlign($image);
     $streamWrapper = $this->streamWrapperManager->getViaUri($file->getFileUri());
-    if ($streamWrapper instanceof \Drupal\Core\StreamWrapper\LocalStream) {
+    if ($streamWrapper instanceof LocalStream) {
       $url = file_url_transform_relative(file_create_url($file->getFileUri()));
     }
     else {
