Skip to content

Commit 8311489

Browse files
committed
Include the mime type in the error message for unrecognized formats
See https://www.woltlab.com/community/thread/314202/
1 parent c5c8a45 commit 8311489

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

wcfsetup/install/files/lib/util/ImageUtil.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ public static function createWebpVariant(string $sourceLocation, string $outputF
246246

247247
default:
248248
throw new \InvalidArgumentException(\sprintf(
249-
"Unsupported image format '%s', expecting one of 'gif', 'jpg', 'png' or 'webp'.",
249+
"Unsupported image format '%s' (mime type %s), expecting one of 'gif', 'jpg', 'png' or 'webp'.",
250+
$imageData['mime'],
250251
$extension
251252
));
252253
}

0 commit comments

Comments
 (0)