diff --git a/src/Intervention/Image/AbstractDecoder.php b/src/Intervention/Image/AbstractDecoder.php index 4c49ab90..efdb7489 100644 --- a/src/Intervention/Image/AbstractDecoder.php +++ b/src/Intervention/Image/AbstractDecoder.php @@ -204,7 +204,7 @@ abstract class AbstractDecoder */ private function decodeDataUrl($data_url) { - $pattern = "/^data:(?:image\/.+)(?:charset=\".+\")?;base64,(?P.+)$/"; + $pattern = "/^data:(?:image\/[a-zA-Z\-\.]+)(?:charset=\".+\")?;base64,(?P.+)$/"; preg_match($pattern, $data_url, $matches); if (is_array($matches) && array_key_exists('data', $matches)) {