Closed murilolivorato closed 5 months ago
I solved like this -
use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Gd\Driver;
use Illuminate\Support\Facades\Storage;
use Intervention\Image\Encoders\AutoEncoder;
$oldlocation = public_path("assets/images/test.jpg");
$newlocation = "photos"
$manager = new ImageManager(new Driver());
$image = $manager->read($oldlocation);
$image->scale(width: 300);
$image->encode(new WebpEncoder(quality: 65));
Storage::disk('public')->put('photo.jpg', $image);
hello , I am trying to stora inside the laravel storage class ,
this works -
I need to save inside the laravel storage
I tryed like this -
or
but nothis seams to work