I have two possible solutions.
Try to fully process the images before trying to save them:
$s3->put($file_path.'original_'.$image_file_name, $image, 'public');
$image->fit(300, 300);
$s3->put($file_path.'medium_'.$image_file_name, $image, 'public');
$image->fit(100, 100);
$s3->put($file_path.'thumb_'.$image_file_name, $image, 'public');
Try applying the image to the line, the actual contents of the output file should work fine:
$s3->put($file_path.'original_'.$image_file_name, (string) $image, 'public');
source
share