Appears as if you're using Intervention Image and AWS:
$image = Image::make(request()->file('photo'));
Storage::disk('s3')->put("/path/toAws/Image.jpg", $image->stream());
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am trying to store my images on Aws and show it on my blog page.
immediately i post with images it shows this Image source not readable but the image is saved on aws.
Controller
private function storeImage($post)
{
if (request()->hasFile('image')){
$original = request()->file('image')->getClientOriginalName();
$post->update([
'image' => request()->file('image')->storeAs('uploads', $original),
]);
$image = Image::make(public_path('image/'. $post->image));
$image->save();
}
Filesystem.php
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application. Just store away!
|
*/
'default' => env('FILESYSTEM_DRIVER', 's3'),
/*
|--------------------------------------------------------------------------
| Default Cloud Filesystem Disk
|--------------------------------------------------------------------------
|
| Many applications store files both locally and in the cloud. For this
| reason, you may specify a default "cloud" driver here. This driver
| will be bound as the Cloud disk implementation in the container.
|
*/
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options.
|
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/
'disks' => [
'local' => [
'driver' => 's3',
'root' => public_path('image/'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
],
],
];
Blade
<img class="post-image rectangle" src="{{ secure_asset('image/' . $post->image ) }}">
What am i doing wrong?
Please or to participate in this conversation.