diff --git a/core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php b/core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php
index 6e3197c..f26e8c4 100644
--- a/core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php
+++ b/core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php
@@ -16,6 +16,13 @@
 abstract class LocalReadOnlyStream extends LocalStream {
 
   /**
+   * {@inheritdoc}
+   */
+  public static function getType() {
+    return StreamWrapperInterface::READ_VISIBLE;
+  }
+
+  /**
    * Support for fopen(), file_get_contents(), etc.
    *
    * Any write modes will be rejected, as this is a read-only stream wrapper.
diff --git a/core/tests/Drupal/Tests/Core/File/LocalReadOnlyStreamTest.php b/core/tests/Drupal/Tests/Core/File/LocalReadOnlyStreamTest.php
new file mode 100644
index 0000000..558a449
--- /dev/null
+++ b/core/tests/Drupal/Tests/Core/File/LocalReadOnlyStreamTest.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Drupal\Tests\Core\File;
+
+use Drupal\Core\StreamWrapper\StreamWrapperInterface;
+use Drupal\file_test\StreamWrapper\DummyReadOnlyStreamWrapper;
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * @coversDefaultClass \Drupal\Core\StreamWrapper\LocalReadOnlyStream
+ *
+ * @package File
+ */
+class LocalReadOnlyStreamTest extends UnitTestCase {
+
+  /**
+   * Tests if the stream wrapper correctly returns its type.
+   */
+  public function testGetType() {
+    $type = DummyReadOnlyStreamWrapper::getType();
+    // Checks that the stream wrapper type is not declared as writable.
+    $this->assertSame(0, $type & StreamWrapperInterface::WRITE);
+  }
+
+}
