mirror of
https://github.com/tecnickcom/TCPDF.git
synced 2025-03-21 06:29:40 +01:00
Fix image file type for urls with query params (#287)
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
This commit is contained in:
parent
0fb31c9ddd
commit
869ab2651b
@ -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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user