在 laravel 10 中处理图像时出现 CORS 错误

问题描述 投票:0回答:1

从源“http://localhost”获取“https://astroway.diploy.in/public/storage/images/banner_191709050155.png”的访问已被 CORS 策略阻止:没有“Access-Control-Allow-” Origin' 标头存在于所请求的资源上。如果不透明响应满足您的需求,请将请求模式设置为“no-cors”以在禁用 CORS 的情况下获取资源。

我在处理图像时遇到此错误。

请帮我解决这个问题

php laravel cors
1个回答
0
投票
<img src="https://astroway.diploy.in/public/storage/images/banner_191709050155.png" alt="profile Pic" height="200" width="200"> 

So you can get the images
or you can download the images and use this option

<img src="{{ asset('img/myimage.png') }}" alt="description of myimage">
© www.soinside.com 2019 - 2024. All rights reserved.