diff --git a/core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php b/core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php
index 4069d7b..55d896a 100644
--- a/core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php
+++ b/core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php
@@ -19,7 +19,7 @@
    * {@inheritdoc}
    */
   public static function getType() {
-    return StreamWrapperInterface::READ_VISIBLE;
+    return StreamWrapperInterface::READ_VISIBLE | StreamWrapperInterface::LOCAL;
   }
 
   /**
diff --git a/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php b/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php
index 83003ba..ae19e02 100644
--- a/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/ReadOnlyStreamWrapperTest.php
@@ -33,6 +33,8 @@ function testReadOnlyBehavior() {
     $type = DummyReadOnlyStreamWrapper::getType();
     // Checks that the stream wrapper type is not declared as writable.
     $this->assertSame(0, $type & StreamWrapperInterface::WRITE);
+    // Checks that the stream wrapper type is declared as local.
+    $this->assertSame(1, $type & StreamWrapperInterface::LOCAL);
 
     // Generate a test file
     $filename = $this->randomMachineName();
