1

我正在使用Intervention图像处理包和 Laravel 上传和裁剪一些图片。我的整个网站都是通过 SSL 提供的,而且 make 方法(用于打开文件)似乎只适用于 HTTP,而不是 HTTPS。这是预期的行为吗?如果是这样,呸。

use Intervention\Image\ImageManager;

// fails when I open over https
//$image_url = "https://mysite.app/avatars/a6-7edaf.jpg"; 

// works when I open over http
//$image_url = "http://mysite.app/avatars/a6-7edaf.jpg"; 

$manager = new ImageManager();
$image = $manager->make($image_url)->encode('jpg');

尝试通过 https 制作/打开时出现错误消息:

NotReadableException in AbstractDecoder.php line 68:
Unable to init from given url (https://mysite.app/avatars/a6-7edaf.jpg).

当我直接浏览到图像时,我可以很好地打开图像,当我传递 https URL 时,我无法从干预中读取/制作文件。

4

0 回答 0