作者 刘锟

update

... ... @@ -1491,10 +1491,10 @@ function thumbImageByUrl($url, $width = 360)
}
//获取图片完整访问地址
$url = getImageUrl($url);
$url_complete = getImageUrl($url);
//获取与原图存储路径相同的压缩路径
$path = parse_url($url, PHP_URL_PATH);
$path = parse_url($url_complete, PHP_URL_PATH);
$path_arr = explode('.', $path);
if (count($path_arr) != 2) {
return $url;
... ... @@ -1503,7 +1503,7 @@ function thumbImageByUrl($url, $width = 360)
$key = implode('.', $path_arr);
try {
$img = \Intervention\Image\Facades\Image::make($url);
$img = \Intervention\Image\Facades\Image::make($url_complete);
//宽度按设定,高度自动调整
$img->resize($width, null, function ($constraint) {
... ...