|
|
@ -125,8 +125,8 @@ class html_optimize_lib
|
|
|
|
$file_path = $imagesPath . $img_src_urls['path'];
|
|
|
|
$file_path = $imagesPath . $img_src_urls['path'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (is_file($file_path)) {
|
|
|
|
if (is_file($file_path)) {
|
|
|
|
$properties = getimagesize($file_path);//获取图片属性
|
|
|
|
$properties = getimagesize($file_path);//获取图片属性,读取失败返回false
|
|
|
|
if (!empty($properties[0]) && !empty($properties[1])) {
|
|
|
|
if ($properties && !empty($properties[0]) && !empty($properties[1])) {
|
|
|
|
$image->width = $properties[0];
|
|
|
|
$image->width = $properties[0];
|
|
|
|
$image->height = $properties[1];
|
|
|
|
$image->height = $properties[1];
|
|
|
|
}
|
|
|
|
}
|
|
|
|