1:设置所有图片src代理到自己的接口,如下:接受get请求的showpic接口
<img src="/showpic?url=https://www.domain.com/faq/uploads/images/20181123/1542965210123968.png" >
2:图片服务端转发
public function showpic(Request $request)
{
$url = $request->get('url', false);
if ($url){
header('Content-type: image/jpeg');
echo file_get_contents($url);
}
}