diff --git a/lib/private/Image.php b/lib/private/Image.php index ca5058e6c65e5..396246125604f 100644 --- a/lib/private/Image.php +++ b/lib/private/Image.php @@ -166,7 +166,9 @@ public function show(?string $mimeType = null): bool { if ($mimeType === null) { $mimeType = $this->mimeType(); } - header('Content-Type: ' . ($mimeType ?? '')); + if ($mimeType !== null) { + header('Content-Type: ' . $mimeType); + } return $this->_output(null, $mimeType); }