diff --git a/include/tcpdf_images.php b/include/tcpdf_images.php index 5e504f2..a3d61b8 100644 --- a/include/tcpdf_images.php +++ b/include/tcpdf_images.php @@ -77,10 +77,7 @@ class TCPDF_IMAGES { } } if (empty($type)) { - $fileinfo = pathinfo($imgfile); - if (isset($fileinfo['extension']) AND (!TCPDF_STATIC::empty_string($fileinfo['extension']))) { - $type = strtolower(trim($fileinfo['extension'])); - } + $type = strtolower(trim(pathinfo(parse_url($imgfile, PHP_URL_PATH), PATHINFO_EXTENSION))); } if ($type == 'jpg') { $type = 'jpeg';