1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-30 09:10:21 +02:00

Optimize GIF detection

This commit is contained in:
Oliver Vogel
2025-05-27 15:53:31 +02:00
parent 88466c6a49
commit 8baac46d50

View File

@@ -22,9 +22,7 @@ abstract class AbstractDecoder implements DecoderInterface
*/
protected function isGifFormat(string $input): bool
{
$head = substr($input, 0, 6);
return $head === 'GIF87a' || $head === 'GIF89a';
return str_starts_with($input, 'GIF87a') || str_starts_with($input, 'GIF89a');
}
/**